module Symbiont::DataReader

Public Instance Methods

data_path() click to toggle source
# File lib/symbiont/data_reader.rb, line 7
def data_path
  return @data_path if @data_path
  return default_data_path if self.respond_to? :default_data_path
  nil
end
data_path=(path) click to toggle source
# File lib/symbiont/data_reader.rb, line 3
def data_path=(path)
  @data_path = path
end
load(file) click to toggle source

The data_source name here must match the name used for the class accessor in the data builder. It is this data_source variable that connects the reader and the builder.

# File lib/symbiont/data_reader.rb, line 16
def load(file)
  @data_source = YAML.load_file "#{data_path}/#{file}"
end