Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created February 24, 2016 12:11
Show Gist options
  • Select an option

  • Save tomcha/f40bbbdf5b11803d5356 to your computer and use it in GitHub Desktop.

Select an option

Save tomcha/f40bbbdf5b11803d5356 to your computer and use it in GitHub Desktop.
main.rb
#!/usr/bin/env ruby
# coding:utf-8
class MyApp
attr_accessor :foo
def initialize(*foo)
@foo = foo
end
def bar()
return 'barですよ'
end
end
class MyApp2 < MyApp
def bar()
return 'barですよ2'
end
end
app = MyApp.new('ふぉおおお')
app2 = MyApp2.new
#app.foo = 'ふぉー'
puts app.foo
puts app.bar
puts app2.bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment