Class: Woyo::Item
- Inherits:
-
WorldObject
- Object
- WorldObject
- Woyo::Item
- Defined in:
- lib/woyo/world/item.rb
Instance Attribute Summary
Attributes inherited from WorldObject
Instance Method Summary collapse
Methods inherited from WorldObject
#attribute_changes, #attribute_clear_changes, #changes, #clear_changes, #initialize, #uid
Methods included from Evaluate
#children, #evaluate, included
Methods included from Attributes
#attribute, #attributes, #changes, #clear_changes, #define_attr, #define_attr!, #define_attr?, #define_attr_default, #define_attr_equals, #define_attr_methods, #dependent_changes, #exclusion, #exclusions, #group, #groups, #is, #is?, #track_changes
Constructor Details
This class inherits a constructor from Woyo::WorldObject
Instance Method Details
#initialize_object ⇒ Object
7 8 9 |
# File 'lib/woyo/world/item.rb', line 7 def initialize_object super end |
#location ⇒ Object
11 12 13 |
# File 'lib/woyo/world/item.rb', line 11 def location self.context.instance_of?( Location ) ? self.context : nil end |
#world ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/woyo/world/item.rb', line 15 def world case when self.context.instance_of?( World ) then self.context when self.context.instance_of?( Location) then self.context.world else nil end end |