Class: Botz::Console
- Inherits:
-
Object
- Object
- Botz::Console
- Defined in:
- lib/botz/console.rb
Overview
botz console
Instance Attribute Summary collapse
-
#definition_file ⇒ Object
readonly
Returns the value of attribute definition_file.
Instance Method Summary collapse
-
#initialize(definition_file = nil) ⇒ Console
constructor
A new instance of Console.
- #open(filepath) ⇒ Object
- #reload! ⇒ Object
Constructor Details
#initialize(definition_file = nil) ⇒ Console
Returns a new instance of Console.
10 11 12 |
# File 'lib/botz/console.rb', line 10 def initialize(definition_file = nil) @definition_file = definition_file end |
Instance Attribute Details
#definition_file ⇒ Object (readonly)
Returns the value of attribute definition_file.
7 8 9 |
# File 'lib/botz/console.rb', line 7 def definition_file @definition_file end |
Instance Method Details
#open(filepath) ⇒ Object
14 15 16 |
# File 'lib/botz/console.rb', line 14 def open(filepath) @definition_file = Botz::DefinitionFile.open(filepath) end |
#reload! ⇒ Object
18 19 20 |
# File 'lib/botz/console.rb', line 18 def reload! @definition_file&.eval_definition end |