lib/cockpit/core/settings.rb in cockpit-0.2.4.1 vs lib/cockpit/core/settings.rb in cockpit-0.2.4.2
- old
+ new
@@ -23,13 +23,13 @@
spec options[:name], options[:class], Cockpit::Settings::Spec.new(options, &block)
settings = Cockpit::Settings.new(options)
- if options[:class] == NilClass
- global_setting options[:name], options[:class], settings
- end
+ #if options[:class] == NilClass
+ global_setting options[:name], options[:class], settings
+ #end
settings
end
def configure(options)
@@ -85,9 +85,13 @@
global_setting(name)
end
def method_missing(method, *args, &block)
global.send(method, *args, &block)
+ end
+
+ def for(clazz, name = :default)
+ global_setting(name, clazz)
end
end
attr_reader :name, :record, :store, :store_type, :record_type