Module: Parse
- Defined in:
- lib/parsecom.rb,
lib/parse/file.rb,
lib/parse/role.rb,
lib/parse/user.rb,
lib/parse/batch.rb,
lib/parse/query.rb,
lib/parse/client.rb,
lib/parse/object.rb,
lib/parse/op/add.rb,
lib/parse/pointer.rb,
lib/parse/version.rb,
lib/parse/relation.rb,
lib/parse/op/delete.rb,
lib/parse/op/remove.rb,
lib/parse/cloud_code.rb,
lib/parse/http_client.rb,
lib/parse/installation.rb,
lib/parse/op/increment.rb,
lib/parse/op/add_unique.rb,
lib/parse/op/add_relation.rb,
lib/parse/batch_http_client.rb,
lib/parse/op/remove_relation.rb
Defined Under Namespace
Modules: Op
Classes: Batch, BatchHttpClient, Client, File, HttpClient, Installation, Object, Pointer, Query, Relation, Role, User
Constant Summary
collapse
- RESERVED_PARSE_CLASS =
{
'_User' => 'Parse::User',
'_Role' => 'Parse::Role',
'_Installation' => 'Parse::Installation'
}
- VERSION =
"0.1.0"
- @@application_id =
ENV['PARSE_APPLICATION_ID']
- @@api_key =
ENV['PARSE_API_KEY']
- @@master_key =
ENV['PARSE_MASTER_KEY']
- @@auto_snake_case =
false
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
47
48
49
|
# File 'lib/parsecom.rb', line 47
def api_key
@@api_key
end
|
.api_key=(api_key) ⇒ Object
51
52
53
|
# File 'lib/parsecom.rb', line 51
def api_key= api_key
@@api_key = api_key
end
|
.application_id ⇒ Object
39
40
41
|
# File 'lib/parsecom.rb', line 39
def application_id
@@application_id
end
|
.application_id=(application_id) ⇒ Object
43
44
45
|
# File 'lib/parsecom.rb', line 43
def application_id= application_id
@@application_id = application_id
end
|
.auto_snake_case ⇒ Object
73
74
75
|
# File 'lib/parsecom.rb', line 73
def auto_snake_case
@@auto_snake_case
end
|
.auto_snake_case=(auto_snake_case) ⇒ Object
77
78
79
|
# File 'lib/parsecom.rb', line 77
def auto_snake_case= auto_snake_case
@@auto_snake_case = auto_snake_case
end
|
.credentials(hash) ⇒ Object
63
64
65
66
67
|
# File 'lib/parsecom.rb', line 63
def credentials hash
@@application_id = hash[:application_id]
@@api_key = hash[:api_key]
@@master_key = hash[:master_key]
end
|
.credentials=(hash) ⇒ Object
69
70
71
|
# File 'lib/parsecom.rb', line 69
def credentials= hash
credentials hash
end
|
.master_key ⇒ Object
55
56
57
|
# File 'lib/parsecom.rb', line 55
def master_key
@@master_key
end
|
.master_key=(master_key) ⇒ Object
59
60
61
|
# File 'lib/parsecom.rb', line 59
def master_key= master_key
@@master_key = master_key
end
|
.Object(parse_class_name, mod = ::Object) ⇒ Object
create or get ParseObject class in the given module
Parameters:
- parse_class_name
-
Parse class name
- mod
-
module where ParseObject is populated
Returns:
subclass of ParseObject for the given parse_class_name
264
265
266
267
268
269
270
271
272
|
# File 'lib/parse/object.rb', line 264
def self.Object parse_class_name, mod=::Object
if RESERVED_PARSE_CLASS.has_key? parse_class_name.to_s
eval RESERVED_PARSE_CLASS[parse_class_name.to_s]
else
Parse::Object.create parse_class_name, mod \
unless mod.const_defined? parse_class_name
mod.const_get parse_class_name
end
end
|
Instance Method Details
#Query(parse_class_name = nil) ⇒ Object
298
299
300
|
# File 'lib/parse/query.rb', line 298
def Query parse_class_name=nil
Query.new parse_class_name
end
|