Class: Degica::Action
- Inherits:
-
Object
- Object
- Degica::Action
- Defined in:
- lib/degica/action.rb
Overview
Actionable objects return actions. These actions can be invoked in the game REPL and delegate function calls to a @target ruby object method.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #do(*args) ⇒ Object
-
#initialize(name_, target_) ⇒ Action
constructor
A new instance of Action.
- #inspect ⇒ Object
Constructor Details
#initialize(name_, target_) ⇒ Action
Returns a new instance of Action.
8 9 10 11 |
# File 'lib/degica/action.rb', line 8 def initialize(name_, target_) @name = name_ @target = target_ end |