Skip to content

Instantly share code, notes, and snippets.

@Arakaki
Created September 5, 2013 13:52
Show Gist options
  • Save Arakaki/6450370 to your computer and use it in GitHub Desktop.
Save Arakaki/6450370 to your computer and use it in GitHub Desktop.
オーバーロード
class Parent
def hello
puts 'Hello,Parent class!'
end
end
class Child < Parent
def hello
super
puts 'Hello,Child class!'
end
end
child = Child.new
puts child.hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment