Sha256: 33f00af9ee06f13bed60394adc5db00608934c845d6d6a3f2421d2a9327a53d6
Contents?: true
Size: 674 Bytes
Versions: 1
Compression:
Stored size: 674 Bytes
Contents
module Compass module Fontcustom # A simple configuration store like the one known from ActiveSupport. module Configurable def self.included(base) base.class_eval do def self.configure(&block) yield config end def self.config @_config ||= Configuration.new end end end class Configuration def method_missing(meth, *args) @config ||= {} if meth.to_s =~ /=$/ sym = meth.to_s[0...-1].to_sym @config[sym] = args.first else @config[meth] end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
compass-fontcustom-1.0.0.pre | lib/compass/fontcustom/configurable.rb |