Class: DataDepo::Loader

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

Direct Known Subclasses

YAMLLoader

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathsObject (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

#loadObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/data_depo/loader.rb', line 13

def load
  raise NotImplementedError
end