Class: MyRubyGem::Cat
Instance Method Summary collapse
-
#initialize(name, gender, color, nails) ⇒ Cat
constructor
A new instance of Cat.
- #scratch ⇒ Object
Methods inherited from Pet
#showColor, #showGender, #showName
Constructor Details
#initialize(name, gender, color, nails) ⇒ Cat
Returns a new instance of Cat.
34 35 36 37 |
# File 'lib/myRubyGem.rb', line 34 def initialize(name, gender, color, nails) super(name, gender, color) @nails = nails end |
Instance Method Details
#scratch ⇒ Object
39 40 41 |
# File 'lib/myRubyGem.rb', line 39 def scratch puts "Cat scratches with #{@nails} nails" end |