Sha256: 9da4ea7c02f768a23a4c39843ad6f92cdd5d698a5bcedd9a99b93cc2a851e42d
Contents?: true
Size: 593 Bytes
Versions: 1
Compression:
Stored size: 593 Bytes
Contents
require 'facets/module/mattr' # gives cattr module CacheableFlash class Config DEFAULTS = { # Specify how multiple flashes at the same key (e.g. :notice, :errors) should be handled :append_as => :br, # or :array } cattr_reader :config cattr_writer :config self.config ||= DEFAULTS def self.configure &block yield @@config end def self.[](key) return nil unless key.respond_to?(:to_sym) CacheableFlash::Config.config[key.to_sym] end def self.method_missing(name, *args) CacheableFlash[name] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cacheable_flash-0.2.10 | lib/cacheable_flash/config.rb |