Sha256: abfc33e312d6c14c479af6cc880f93cbd15db4956b4f8011a3085d44cbd09529

Contents?: true

Size: 539 Bytes

Versions: 5

Compression:

Stored size: 539 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
    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

5 entries across 5 versions & 1 rubygems

Version Path
symbiont-0.10.0 lib/symbiont/data_reader.rb
symbiont-0.9.0 lib/symbiont/data_reader.rb
symbiont-0.8.0 lib/symbiont/data_reader.rb
symbiont-0.7.0 lib/symbiont/data_reader.rb
symbiont-0.6.0 lib/symbiont/data_reader.rb