Class: Vial::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/vial/loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, box:) ⇒ Loader

Returns a new instance of Loader.



5
6
7
8
# File 'lib/vial/loader.rb', line 5

def initialize(path, box:)
  @path = path
  @box = box
end

Instance Method Details

#loadObject



10
11
12
# File 'lib/vial/loader.rb', line 10

def load
  @box.module_eval(File.read(@path), @path, 1)
end