Module: SmoothOperator::Operator
- Included in:
- Base
- Defined in:
- lib/smooth_operator/operator.rb
Defined Under Namespace
Modules: ClassMethods, HelperMethods
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.included(base) ⇒ Object
42
43
44
|
# File 'lib/smooth_operator/operator.rb', line 42
def self.included(base)
base.extend(ClassMethods)
end
|
Instance Method Details
11
12
13
|
# File 'lib/smooth_operator/operator.rb', line 11
def
{}
end
|
#make_the_call(http_verb, relative_path = '', data = {}, options = {}) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/smooth_operator/operator.rb', line 15
def make_the_call(http_verb, relative_path = '', data = {}, options = {})
options ||= {}
relative_path = resource_path(relative_path)
options[:headers] = .merge(options[:headers] || {})
options[:parent_object] ||= _options[:parent_object]
call_args = before_request(http_verb, relative_path, data, options)
self.class.make_the_call(*call_args) do |remote_call|
yield(remote_call)
end
end
|
#resource_path(relative_path) ⇒ Object