lib/clamp/attribute_declaration.rb in clamp-0.3.0 vs lib/clamp/attribute_declaration.rb in clamp-0.3.1
- old
+ new
@@ -12,10 +12,10 @@
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)
+ else
send(attribute.default_method)
end
end
end
\ No newline at end of file