Class: Door
- Defined in:
- lib/gamefic-standard/entities/door.rb
Overview
An openable portal.
Instance Attribute Summary
Attributes included from Lockable
Attributes inherited from Portal
Instance Method Summary collapse
- #locked=(bool) ⇒ Object
- #open=(bool) ⇒ Object
- #post_initialize ⇒ Object
- #two_way_lock_key=(key) ⇒ Object
Methods included from Lockable
#lock_key?, #locked?, #unlocked?
Methods included from Openable
#accessible?, #closed?, #open?
Methods inherited from Portal
#instruction, #name, #reverse, #synonyms
Instance Method Details
#locked=(bool) ⇒ Object
18 19 20 21 |
# File 'lib/gamefic-standard/entities/door.rb', line 18 def locked= bool super update_reverse_lock end |
#open=(bool) ⇒ Object
13 14 15 16 |
# File 'lib/gamefic-standard/entities/door.rb', line 13 def open= bool super update_reverse_open end |
#post_initialize ⇒ Object
9 10 11 |
# File 'lib/gamefic-standard/entities/door.rb', line 9 def post_initialize update_reverse_open end |
#two_way_lock_key=(key) ⇒ Object
23 24 25 26 27 |
# File 'lib/gamefic-standard/entities/door.rb', line 23 def two_way_lock_key= key lock_key = key return if reverse.nil? reverse.lock_key = key end |