lib/structure/class_methods.rb in structure-1.2.0 vs lib/structure/class_methods.rb in structure-1.2.1

- old
+ new

@@ -22,24 +22,21 @@ CODE end module_eval <<-CODE, __FILE__, __LINE__ + 1 def #{name} - @__mutex.synchronize { + __exclusive { break if @__table.key?("#{name}") - @__table["#{name}"] = __#{name} + @__table["#{name}"] = __get_#{name} @__table["#{name}"].freeze - - @__table["#{name}"] } @__table["#{name}"] end CODE - define_method "__#{name}", block - private "__#{name}" + private define_method "__get_#{name}", block @attribute_names << name name.to_sym end