motion/cdq/relationship_query.rb in cdq-0.1.1 vs motion/cdq/relationship_query.rb in cdq-0.1.2

- old
+ new

@@ -18,19 +18,19 @@ @predicate = self.where(@inverse_rel.name.to_sym => @owner).predicate end end # Creates a new managed object within the target relationship - # + # def new(opts = {}) super(opts).tap do |obj| add(obj) end end # Add an existing object to the relationship - # + # def add(obj) if @inverse_rel.isToMany obj.send(@inverse_rel.name).addObject(@owner) else obj.send("#{@inverse_rel.name}=", @owner) @@ -54,10 +54,10 @@ def set self end - # This works in a special way. If we're extending a regular NSSet, it will + # This works in a special way. If we're extending a regular NSSet, it will # create a new method that calls allObjects. If we're extending a NSOrderedSet, # the override will not work, and we get the array method already defined on # NSOrderedSet, which is actually exactly what we want. def array self.allObjects