Class: Bricolage::JobNet::FileLoader
- Inherits:
-
Object
- Object
- Bricolage::JobNet::FileLoader
- Defined in:
- lib/bricolage/jobnet.rb
Instance Method Summary collapse
-
#initialize(ctx) ⇒ FileLoader
constructor
A new instance of FileLoader.
- #load(ref) ⇒ Object
Constructor Details
#initialize(ctx) ⇒ FileLoader
Returns a new instance of FileLoader.
283 284 285 |
# File 'lib/bricolage/jobnet.rb', line 283 def initialize(ctx) @context = ctx end |
Instance Method Details
#load(ref) ⇒ Object
287 288 289 290 291 |
# File 'lib/bricolage/jobnet.rb', line 287 def load(ref) path = @context.root_relative_path(ref.relative_path) raise ParameterError, "undefined subnet: #{ref}" unless path.file? JobNet.load(path, ref) end |