lib/representable/definition.rb in representable-1.1.4 vs lib/representable/definition.rb in representable-1.1.5
- old
+ new
@@ -6,9 +6,13 @@
def initialize(sym, options={})
@name = sym.to_s
@options = options
end
+
+ def clone
+ self.class.new(name, options.clone) # DISCUSS: make generic Definition.cloned_attribute that passes list to constructor.
+ end
def setter
:"#{name}="
end