Class: Degica::Ruby

Inherits:
Object show all
Defined in:
lib/degica/objects/ruby.rb

Instance Attribute Summary

Attributes included from Collectable

#collection

Instance Method Summary collapse

Methods inherited from Object

#initialize, #prompt

Methods included from Actionable

#do, #prompt

Constructor Details

This class inherits a constructor from Degica::Object

Instance Method Details

#actionsObject



7
8
9
10
11
12
13
# File 'lib/degica/objects/ruby.rb', line 7

def actions
  if Game.objects.actor.has_item?(self)
    []
  else
    [Action.new(:take, self)]
  end
end

#describeObject



20
21
22
# File 'lib/degica/objects/ruby.rb', line 20

def describe
  File.read(Degica.root + '/data/images/ruby.ansi')
end

#nameObject



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

def name
  :ruby
end

#takeObject



15
16
17
18
# File 'lib/degica/objects/ruby.rb', line 15

def take
  Game.objects.actor.pickup(self)
  NilActionable.new
end