oop/test/init_param.rb
tests/_examples/oop/test/init_param.rb in the metorex repository.
class Test
def initialize(x)
@x = x
end
attr_reader :x
end
t = Test.new(42)
puts t.x
tests/_examples/oop/test/init_param.rb in the metorex repository.
class Test
def initialize(x)
@x = x
end
attr_reader :x
end
t = Test.new(42)
puts t.x