Class: Boty::ScriptLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/boty/script_loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(bot) ⇒ ScriptLoader

Returns a new instance of ScriptLoader.



3
4
5
# File 'lib/boty/script_loader.rb', line 3

def initialize(bot)
  @dsl = DSL.new bot
end

Instance Method Details

#loadObject



7
8
9
10
11
# File 'lib/boty/script_loader.rb', line 7

def load
  scripts_to_load.each do |file|
    @dsl.instance_eval File.read(file), file, 1
  end
end