Class: DataDepo::Loader
- Inherits:
-
Object
- Object
- DataDepo::Loader
- Defined in:
- lib/data_depo/loader.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(paths) ⇒ Loader
constructor
A new instance of Loader.
- #load ⇒ Object
Constructor Details
#initialize(paths) ⇒ Loader
Returns a new instance of Loader.
5 6 7 8 9 10 11 |
# File 'lib/data_depo/loader.rb', line 5 def initialize(paths) roots = ::DataDepo.definition_path @paths = roots.map {|root| File.join(root, *paths.map {|path| path.to_s}) } @paths = [File.join(*paths.map {|path| path.to_s})] if @paths.empty? end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
17 18 19 |
# File 'lib/data_depo/loader.rb', line 17 def paths @paths end |
Instance Method Details
#load ⇒ Object
13 14 15 |
# File 'lib/data_depo/loader.rb', line 13 def load raise NotImplementedError end |