lib/compass/fontcustom/configurable.rb in compass-fontcustom-1.0.0.pre vs lib/compass/fontcustom/configurable.rb in compass-fontcustom-1.0.0.pre3
- old
+ new
@@ -3,17 +3,19 @@
# 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
+ base.extend ClassMethods
+ end
- def self.config
- @_config ||= Configuration.new
- end
+ module ClassMethods
+ def configure(&block)
+ yield config
+ end
+
+ def config
+ @_config ||= Configuration.new
end
end
class Configuration
def method_missing(meth, *args)