Sha256: a304a862c9178174cc7841b213e5b7f160dce2824a15541d7ce5359362da3f28

Contents?: true

Size: 341 Bytes

Versions: 2

Compression:

Stored size: 341 Bytes

Contents

module Gumdrop::Data
  class YAMLDBDataProvider < YAMLandJSONDataProvider

    extension :yamldb


    def data_for(filepath)
      docs=[]
      File.open(filepath, 'r') do |f|
        YAML.load_documents(f) do |doc|
          docs << supply_data( doc ) #unless doc.has_key?("__proto__")
        end
      end
      docs
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gumdrop-1.0.1 lib/gumdrop/data_providers/yamldb.rb
gumdrop-1.0.0 lib/gumdrop/data_providers/yamldb.rb