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

Expert

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 194 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!