Class: Datafile::FileDataset

Inherits:
DatasetNode show all
Defined in:
lib/datafile/workers/file/dataset.rb

Constant Summary collapse

@@registry =

read dataset from file(system)

nil

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DatasetNode

#name, #opts, #setup

Constructor Details

#initialize(dataset) ⇒ FileDataset

Returns a new instance of FileDataset.



18
19
20
# File 'lib/datafile/workers/file/dataset.rb', line 18

def initialize( dataset )
  super( dataset )
end

Class Method Details

.registryObject



10
11
12
13
14
15
16
# File 'lib/datafile/workers/file/dataset.rb', line 10

def self.registry
  ## use ||=  why, why not??  - add Registry as nested class, why, why not ??
  if @@registry.nil?
    @@registry = FileDatasetRegistry.new
  end
  @@registry
end

Instance Method Details

#dumpObject



26
27
28
29
30
# File 'lib/datafile/workers/file/dataset.rb', line 26

def dump
  ## for debuggin dump dataset  -- todo (also check if folder exits ??)
  puts "dataset '#{name}' opts=#{opts.to_json}"     ## use opts.inspect instead of to_json - why? why not?
  puts "  repo-dir '#{repo_dir}'"
end

#repo_dirObject

check: use (rename to) include dir (or local_repo_dir) - why, why not ???



22
23
24
# File 'lib/datafile/workers/file/dataset.rb', line 22

def repo_dir     ### check: use (rename to) include dir (or local_repo_dir) - why, why not ??? 
  registry.lookup( name )
end