Module: SmoothOperator::Operator::ClassMethods
- Defined in:
- lib/smooth_operator/operator.rb
Constant Summary collapse
- OPTIONS =
[:endpoint, :endpoint_user, :endpoint_pass, :timeout]
Instance Attribute Summary collapse
Instance Method Summary collapse
- #make_the_call(http_verb, relative_path = '', data = {}, options = {}) ⇒ Object
- #query_string(params) ⇒ Object
Instance Attribute Details
#headers ⇒ Object
66 67 68 |
# File 'lib/smooth_operator/operator.rb', line 66 def headers Helpers.get_instance_variable(self, :headers, {}) end |
Instance Method Details
#make_the_call(http_verb, relative_path = '', data = {}, options = {}) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/smooth_operator/operator.rb', line 73 def make_the_call(http_verb, relative_path = '', data = {}, = {}) operator_args = operator_method_args(http_verb, relative_path, data, ) if Helpers.present?(operator_args[4][:hydra]) operator_call = Operators::Typhoeus else operator_call = Operators::Faraday end operator_call.make_the_call(*operator_args) do |remote_call| block_given? ? yield(remote_call) : remote_call end end |
#query_string(params) ⇒ Object
87 88 89 |
# File 'lib/smooth_operator/operator.rb', line 87 def query_string(params) params end |