Sha256: 82e830a2ea16e39fa87333b9eea107a8f8859ccac047564ee55d6a91ecc69148

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

module Symbiont
  module DataReader

    def data_path=(path)
      @data_path = path
    end

    def data_path
      return @data_path if @data_path
      return default_data_path if self.respond_to? :default_data_path
      nil
    end

    # 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.
    def load(file)
      @data_source = YAML.load_file "#{data_path}/#{file}"
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
symbiont-0.11.0 lib/symbiont/data_reader.rb