Sha256: de912b53f12e879c9f43976323556acb8b8d623f16970c5fbe3e9f5af2479d02

Contents?: true

Size: 256 Bytes

Versions: 8

Compression:

Stored size: 256 Bytes

Contents

module Gumdrop::Data
  class CSVDataProvider < Provider
    
    extension :csv

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

    def data_for(filepath)
      supply_data CSV.read(filepath)
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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