Class: Room
- Inherits:
-
Thing
- Object
- Thing
- Room
- Defined in:
- lib/gamefic-standard/entities/room.rb
Instance Attribute Summary collapse
-
#explicit_exits ⇒ Object
writeonly
Sets the attribute explicit_exits.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#explicit_exits=(value) ⇒ Object (writeonly)
Sets the attribute explicit_exits
2 3 4 |
# File 'lib/gamefic-standard/entities/room.rb', line 2 def explicit_exits=(value) @explicit_exits = value end |
Class Method Details
.explicit_exits=(bool) ⇒ Object
25 26 27 |
# File 'lib/gamefic-standard/entities/room.rb', line 25 def explicit_exits=(bool) set_default explicit_exits: bool end |
.explicit_exits? ⇒ Boolean
21 22 23 |
# File 'lib/gamefic-standard/entities/room.rb', line 21 def explicit_exits? default_attributes[:explicit_exits] end |
Instance Method Details
#explicit_exits? ⇒ Boolean
6 7 8 |
# File 'lib/gamefic-standard/entities/room.rb', line 6 def explicit_exits? @explicit_exits end |
#find_portal(direction) ⇒ Object
14 15 16 17 18 |
# File 'lib/gamefic-standard/entities/room.rb', line 14 def find_portal(direction) d = direction.to_s portals = children.that_are(Portal).delete_if { |p| p.direction.to_s != d } portals[0] end |
#tell(message) ⇒ Object
10 11 12 |
# File 'lib/gamefic-standard/entities/room.rb', line 10 def tell() children.each { |c| c.tell } end |