Sha256: 3e83c30982628e278fd731b1e2b36a1b338cdd6d7e4952f1c357cfe6ee2dad8b
Contents?: true
Size: 935 Bytes
Versions: 1
Compression:
Stored size: 935 Bytes
Contents
class PFObject attr_reader :fields def self.objectWithClassName(name) new end def initialize @fields = {} end def objectForKey(field) @fields[field] end def setObject(value, forKey:key) @fields[key] = value end end class PFQuery attr_reader :constraints cattr_accessor :last_object cattr_accessor :result_objects def initWithClassName(name) @constraints = {} PFQuery.last_object = self self end def whereKey(key, equalTo:value) @constraints[key] = value end def findObjectsInBackgroundWithBlock(block) block.call(result_objects || [], nil) end def findObjects result_objects || [] end end class PFUser cattr_accessor :currentUser def self.user new end end class Author < MotionParse::Base attribute :first_name, :last_name, :age has_many :posts end class Post < MotionParse::Base attribute :title, :text end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
motion-parse-0.0.1 | spec/env.rb |