class Botz::DefinitionFile

botz interface binding

Constants

CSV

Attributes

definition[R]
path[R]

Public Class Methods

new(path) click to toggle source
# File lib/botz/definition_file.rb, line 40
def initialize(path)
  @path = path
end
open(filepath) click to toggle source
# File lib/botz/definition_file.rb, line 17
def self.open(filepath)
  object = new(filepath)
  object.eval_definition
  object
end

Public Instance Methods

console() click to toggle source
# File lib/botz/definition_file.rb, line 33
def console
  require 'pry'
  Pry.start(Botz::Console.new(self))
end
eval_definition() click to toggle source

rubocop:disable Security/Eval

# File lib/botz/definition_file.rb, line 24
def eval_definition
  @definition = eval(File.open(path).read)
end
shell() click to toggle source

rubocop:enable Security/Eval

# File lib/botz/definition_file.rb, line 29
def shell
  @shell ||= Botz::Shell.new(self)
end