Class: Boty::ScriptLoader
- Inherits:
-
Object
- Object
- Boty::ScriptLoader
- Defined in:
- lib/boty/script_loader.rb
Instance Method Summary collapse
-
#initialize(bot) ⇒ ScriptLoader
constructor
A new instance of ScriptLoader.
- #load ⇒ Object
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
#load ⇒ Object
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 |