Class: Alchemist::Commands::Base
- Defined in:
- lib/alchemist-server/commands/base.rb
Direct Known Subclasses
Appear, Basics, Compounds, Create, Describe, DirectionCommand, Element, Forge, Formulate, Inventory, Location, Lock, Look, Message, Put, Read, Take, Who
Instance Attribute Summary collapse
-
#avatar_name ⇒ Object
readonly
Returns the value of attribute avatar_name.
-
#history ⇒ Object
readonly
Returns the value of attribute history.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(avatar_name, history) ⇒ Base
constructor
A new instance of Base.
- #outcome(response = nil, new_world = nil, command = nil) ⇒ Object
Constructor Details
#initialize(avatar_name, history) ⇒ Base
Returns a new instance of Base.
14 15 16 17 |
# File 'lib/alchemist-server/commands/base.rb', line 14 def initialize(avatar_name, history) @avatar_name = avatar_name @history = history end |
Instance Attribute Details
#avatar_name ⇒ Object (readonly)
Returns the value of attribute avatar_name.
12 13 14 |
# File 'lib/alchemist-server/commands/base.rb', line 12 def avatar_name @avatar_name end |
#history ⇒ Object (readonly)
Returns the value of attribute history.
12 13 14 |
# File 'lib/alchemist-server/commands/base.rb', line 12 def history @history end |
Class Method Details
.pattern(arg = nil) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/alchemist-server/commands/base.rb', line 4 def self.pattern(arg = nil) if arg @pattern = arg end @pattern end |
.run(avatar_name, history, *args) ⇒ Object
25 26 27 |
# File 'lib/alchemist-server/commands/base.rb', line 25 def self.run(avatar_name, history, *args) new(avatar_name, history).run *args end |