lib/cockpit/core/include.rb in cockpit-0.2.1 vs lib/cockpit/core/include.rb in cockpit-0.2.2
- old
+ new
@@ -14,9 +14,13 @@
@cockpit.roots.map(&:key).flatten.each do |key|
define_method key do
send(:cockpit).send(key)
end
+ define_method "#{key}=" do |value|
+ send(:cockpit).send("#{key}=", value)
+ end
+
define_method "#{key}?" do
send(:cockpit).present?(key)
end
end
end