lib/dslize/dslize.rb in dslize-0.0.2 vs lib/dslize/dslize.rb in dslize-0.0.3

- old
+ new

@@ -66,10 +66,10 @@ end private def attribute(type, name, args) args[:type] = type - DSLize.current_object[:attributes] = {} + DSLize.current_object[:attributes] ||= {} DSLize.current_object[:attributes][name] = args end def relation(type, name, args) name = (name.name rescue name.to_s).split('::').last