Class: ProgramR::Command
- Inherits:
-
Object
- Object
- ProgramR::Command
- Defined in:
- lib/programr/aiml_elements.rb
Instance Method Summary collapse
- #execute ⇒ Object (also: #to_s)
-
#initialize(text) ⇒ Command
constructor
A new instance of Command.
- #inspect ⇒ Object
Constructor Details
#initialize(text) ⇒ Command
Returns a new instance of Command.
346 |
# File 'lib/programr/aiml_elements.rb', line 346 def initialize(text) @command = text end |
Instance Method Details
#execute ⇒ Object Also known as: to_s
347 |
# File 'lib/programr/aiml_elements.rb', line 347 def execute; `#{@command}` end |
#inspect ⇒ Object
349 |
# File 'lib/programr/aiml_elements.rb', line 349 def inspect() "cmd -> #{@command}" end |