require 'pp'
class X
def initialize(a)
@a = a
end
end
class Y < X
def initialize(a)
super
@b = 5
end
end
class Z
def initialize(a,b)
@a = a
@b = b
end
end
pp Y.new(3)
pp Z.new(3,5)
Add a code snippet to your website: www.paste.org