lib/cockpit/core/include.rb in cockpit-0.2.4.2 vs lib/cockpit/core/include.rb in cockpit-0.2.4.3
- old
+ new
@@ -21,9 +21,13 @@
end
define_method "#{key}?" do
send(:cockpit).present?(key)
end
+
+ define_method "setting" do |key, scope|
+ Cockpit::Settings.for(scope ? scope.to_s.camelize : NilClass)[key]
+ end
end
end
@cockpit
end