Class: Degica::Matz

Inherits:
Person show all
Defined in:
lib/degica/objects/people/matz.rb

Instance Attribute Summary

Attributes included from Collectable

#collection

Instance Method Summary collapse

Methods inherited from Person

#actions, #describe, #initialize, #inspect, #talk

Methods inherited from Object

#actions, #describe, #initialize, #prompt

Methods included from Actionable

#actions, #describe, #do, #prompt

Constructor Details

This class inherits a constructor from Degica::Person

Instance Method Details

#descriptionObject



20
21
22
23
24
25
# File 'lib/degica/objects/people/matz.rb', line 20

def description
  desc = []
  desc << "He's smiling at you. You smile back."
  desc << "He is holding a ruby." if holding?(:ruby)
  desc
end

#give(object = nil) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/degica/objects/people/matz.rb', line 11

def give(object = nil)
  super.tap do
    if object.name == :ruby
      puts "He thanks you for bringing him the ruby."
      Game.objects.actor.award(20)
    end
  end
end

#nameObject



3
4
5
# File 'lib/degica/objects/people/matz.rb', line 3

def name
  :matz
end

#quoteObject



7
8
9
# File 'lib/degica/objects/people/matz.rb', line 7

def quote
  Faker::Matz.quote
end