Class: Larrow::Runner::Manifest::BaseLoader
- Inherits:
-
Object
- Object
- Larrow::Runner::Manifest::BaseLoader
- Defined in:
- lib/larrow/runner/manifest/base_loader.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#source_accessor ⇒ Object
Returns the value of attribute source_accessor.
Instance Method Summary collapse
- #config_file ⇒ Object
-
#initialize(source_accessor) ⇒ BaseLoader
constructor
A new instance of BaseLoader.
- #load ⇒ Object
Constructor Details
#initialize(source_accessor) ⇒ BaseLoader
Returns a new instance of BaseLoader.
5 6 7 |
# File 'lib/larrow/runner/manifest/base_loader.rb', line 5 def initialize source_accessor self.source_accessor = source_accessor end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
4 5 6 |
# File 'lib/larrow/runner/manifest/base_loader.rb', line 4 def configuration @configuration end |
#source_accessor ⇒ Object
Returns the value of attribute source_accessor.
4 5 6 |
# File 'lib/larrow/runner/manifest/base_loader.rb', line 4 def source_accessor @source_accessor end |
Instance Method Details
#config_file ⇒ Object
18 19 20 |
# File 'lib/larrow/runner/manifest/base_loader.rb', line 18 def config_file self.class.const_get('CONFIG_FILE') end |
#load ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/larrow/runner/manifest/base_loader.rb', line 9 def load content = source_accessor.get config_file return nil if content.nil? self.configuration = Configuration.new parse content self.configuration end |