Sha256: 348825cc8aa5191f12721022ea45aaa12ced03c86d93fbe53232bde50e736f6c

Contents?: true

Size: 522 Bytes

Versions: 7

Compression:

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

7 entries across 7 versions & 1 rubygems

Version Path
symbiont-1.2.0 lib/symbiont/data_reader.rb
symbiont-1.1.2 lib/symbiont/data_reader.rb
symbiont-1.1.0 lib/symbiont/data_reader.rb
symbiont-1.0.0 lib/symbiont/data_reader.rb
symbiont-0.14.0 lib/symbiont/data_reader.rb
symbiont-0.13.0 lib/symbiont/data_reader.rb
symbiont-0.12.0 lib/symbiont/data_reader.rb