Class: ThemockerpushActiveResource
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- ThemockerpushActiveResource
show all
- Defined in:
- lib/themockerpush/themockerpush_active_resource.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of ThemockerpushActiveResource.
10
11
12
|
# File 'lib/themockerpush/themockerpush_active_resource.rb', line 10
def initialize(params)
super(params.merge({:api_key => Themockerpush::API_KEY}))
end
|
Class Method Details
.collection_path(prefix_options = {}, query_options = nil) ⇒ Object
20
21
22
23
|
# File 'lib/themockerpush/themockerpush_active_resource.rb', line 20
def collection_path(prefix_options = {}, query_options = nil)
prefix_options, query_options = split_options(prefix_options) if query_options.nil?
"#{prefix(prefix_options)}#{collection_name}#{query_string(query_options)}"
end
|
.custom_method_collection_url(method_name, options = {}) ⇒ Object
25
26
27
28
|
# File 'lib/themockerpush/themockerpush_active_resource.rb', line 25
def custom_method_collection_url(method_name, options = {})
prefix_options, query_options = split_options(options)
"#{prefix(prefix_options)}#{collection_name}/#{method_name}#{query_string(query_options)}"
end
|
.element_path(id, prefix_options = {}, query_options = nil) ⇒ Object
15
16
17
18
|
# File 'lib/themockerpush/themockerpush_active_resource.rb', line 15
def element_path(id, prefix_options = {}, query_options = nil)
prefix_options, query_options = split_options(prefix_options) if query_options.nil?
"#{prefix(prefix_options)}#{collection_name}/#{id}#{query_string(query_options)}"
end
|