Sha256: 6e0a4a02911441849b278f3b1814e023eaacfec7808025b399aa8044aae98e34
Contents?: true
Size: 616 Bytes
Versions: 1
Compression:
Stored size: 616 Bytes
Contents
module ParseModel class Query < PFQuery def setClassObject(classObject) @classObject = classObject end def initWithClassNameAndClassObject(className, classObject:myClassObject) self.initWithClassName(className) self.setClassObject(myClassObject) self end def find(&block) return self.findObjects.map {|obj| @classObject.new(obj)} unless block_given? self.findObjectsInBackgroundWithBlock(lambda do |objects, error| objects = objects.map {|obj| @classObject.new(obj)} if objects block.call(objects, error) end) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ParseModel-0.0.3 | lib/ParseModel/query.rb |