Class: MyRubyGem::Dog
Instance Method Summary collapse
- #bark ⇒ Object
-
#initialize(name, gender, color, sound) ⇒ Dog
constructor
A new instance of Dog.
Methods inherited from Pet
#showColor, #showGender, #showName
Constructor Details
#initialize(name, gender, color, sound) ⇒ Dog
Returns a new instance of Dog.
23 24 25 26 |
# File 'lib/myRubyGem.rb', line 23 def initialize(name, gender, color, sound) super(name, gender, color) @sound = sound end |
Instance Method Details
#bark ⇒ Object
28 29 30 |
# File 'lib/myRubyGem.rb', line 28 def puts "Dog #{@sound}" end |