Created
April 30, 2010 04:28
-
-
Save stopthink/384741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bicycle | |
attr_reader :gears, :wheels, :seats | |
def intialize(gears = 1) | |
@wheels = 2 | |
@seats = 1 | |
@gears = gears | |
end | |
end | |
class Tandem < Bicycle | |
def initialize(gears) | |
super | |
@seats = 2 | |
end | |
end | |
bike = Tandem.new(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bike.rb:13:in
'initialize': wrong number of arguments(1 for 0) (ArgumentError) from bike.rb:13:in
initialize'from bike.rb:18:in
new' from bike.rb:18:in