Sha256: af6710fdc55b643aa26d1ee27a628042094471dfce9e8aaa959809b5baecfc02

Contents?: true

Size: 282 Bytes

Versions: 8

Compression:

Stored size: 282 Bytes

Contents

module Gumdrop::Data
  class YAMLandJSONDataProvider < Provider

    extensions :yaml, :yml, :json

    def available?
      require 'yaml'
      true
    rescue LoadError
      false
    end

    def data_for(filepath)
      supply_data YAML.load_file(filepath)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gumdrop-1.1.3 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.1.2 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.1.1 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.1.0 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.0.3 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.0.2 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.0.1 lib/gumdrop/data_providers/yaml_and_json.rb
gumdrop-1.0.0 lib/gumdrop/data_providers/yaml_and_json.rb