Question from the Ruby test

What is the output of the following code? class A def method1 puts 'method1' end private def method3 puts 'method3' end end obj = A.new obj.method1 obj.method3

Hard

What is the visibility of the following methods?

class SomeClass
  def self.method1
  end

  def method2
  end

  private

  def method3
  end

  def self.method4
  end
end
Author: HivebriteStatus: PublishedQuestion passed 243 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!