Sha256: f53651ed8b004fe39f9247432351581d979c13e0bdf67b7c804719dd3b8353ed

Contents?: true

Size: 334 Bytes

Versions: 13

Compression:

Stored size: 334 Bytes

Contents

class Forgery

  class Formats

    def initialize
      @formats = {}
    end

    def [](key)
      symbolized_key = key.to_sym
      @formats[symbolized_key] ||= FileReader.read_format(symbolized_key)
    end

    def loaded?(key)
      @formats.has_key?(key.to_sym)
    end

    def reset!
      @formats = {}
    end

  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
forgery-0.3.12 lib/forgery/formats.rb
forgery-0.3.11 lib/forgery/formats.rb
forgery-0.3.10 lib/forgery/formats.rb
forgery-0.3.9 lib/forgery/formats.rb
forgery-0.3.8 lib/forgery/formats.rb
forgery-0.3.7 lib/forgery/formats.rb
forgery-0.3.6 lib/forgery/formats.rb
forgery-0.3.5 lib/forgery/formats.rb
forgery-0.3.4 lib/forgery/formats.rb
forgery-0.3.3 lib/forgery/formats.rb
forgery-0.3.2 lib/forgery/formats.rb
forgery-0.3.1 lib/forgery/formats.rb
forgery-0.3.0 lib/forgery/formats.rb