Class: Botz::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/botz/console.rb

Overview

botz console

Instance Attribute Summary collapse

Instance Method Summary collapse

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_fileObject (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