lib/clamp/attribute_declaration.rb in clamp-0.2.3 vs lib/clamp/attribute_declaration.rb in clamp-0.3.0
- old
+ new
@@ -1,17 +1,17 @@
module Clamp
-
+
module AttributeDeclaration
protected
-
+
def define_accessors_for(attribute, &block)
define_reader_for(attribute)
define_default_for(attribute)
define_writer_for(attribute, &block)
end
-
+
def define_reader_for(attribute)
define_method(attribute.read_method) do
if instance_variable_defined?(attribute.ivar_name)
instance_variable_get(attribute.ivar_name)
elsif respond_to?(attribute.default_method)
@@ -34,7 +34,7 @@
instance_variable_set(attribute.ivar_name, value)
end
end
end
-
+
end
\ No newline at end of file