Class: MyRubyGem::Cat

Inherits:
Pet
  • Object
show all
Defined in:
lib/myRubyGem.rb

Instance Method Summary collapse

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

#scratchObject



39
40
41
# File 'lib/myRubyGem.rb', line 39

def scratch
  puts "Cat scratches with #{@nails} nails"
end