Class: Parse::Role
Defined Under Namespace
Classes: RoleItemArray
Instance Attribute Summary
Attributes inherited from Object
#acl, #created_at, #parse_object_id, #updated_at
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ Role
constructor
A new instance of Role.
Methods inherited from Object
count, count!, #create, create, #create!, #delete, #delete!, #deleted?, find, find!, find_all, find_all!, find_by_id, find_by_id!, #get_column, #method_missing, #new?, #parse_class_name, #parse_client, #pointer, register_parse_class, reserved_column?, reserved_columns, #save, #save!, #set_column, #to_h, #to_json, #to_s, #update, #update!, #updated?
Methods included from Util
Constructor Details
#initialize(hash) ⇒ Role
Returns a new instance of Role.
10 11 12 13 14 15 16 17 |
# File 'lib/parse/role.rb', line 10 def initialize hash super #set_column 'roles', RoleItemArray.new(Parse::Role) #set_column 'users', RoleItemArray.new(Parse::User) set_column 'roles', Parse::Relation.new(self, 'roles', {'className' => '_Role'}) set_column 'users', Parse::Relation.new(self, 'users', {'className' => '_User'}) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Parse::Object
Class Method Details
.parse_class_name ⇒ Object
5 6 7 |
# File 'lib/parse/role.rb', line 5 def parse_class_name '_Role' end |