Sha256: 8b287c1eb49ac6496eb78f3559ce318dfcf88aaa9cb4184fed7486ca1c207cda

Contents?: true

Size: 351 Bytes

Versions: 9

Compression:

Stored size: 351 Bytes

Contents

class Forgery

  class Formats

    def initialize
      @formats = {}
    end

    def [](key)
      symbolized_key = key.to_sym
      @formats[symbolized_key] ||= Forgery::Extend(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

9 entries across 9 versions & 1 rubygems

Version Path
forgery-0.8.1 lib/forgery/formats.rb
forgery-0.7.0 lib/forgery/formats.rb
forgery-0.6.0 lib/forgery/formats.rb
forgery-0.5.0 lib/forgery/formats.rb
forgery-0.4.4 lib/forgery/formats.rb
forgery-0.4.3 lib/forgery/formats.rb
forgery-0.4.2 lib/forgery/formats.rb
forgery-0.4.1 lib/forgery/formats.rb
forgery-0.4.0 lib/forgery/formats.rb