module SmoothOperator::ClassMethods
Constants
- OPTIONS
Public Instance Methods
attributes_black_list()
click to toggle source
# File lib/smooth_operator/attribute_assignment.rb, line 78 def attributes_black_list Helpers.get_instance_variable(self, :attributes_black_list, Set.new) end
attributes_black_list_add(*getters)
click to toggle source
# File lib/smooth_operator/attribute_assignment.rb, line 86 def attributes_black_list_add(*getters) attributes_black_list.merge getters.map(&:to_s) end
attributes_white_list()
click to toggle source
# File lib/smooth_operator/attribute_assignment.rb, line 74 def attributes_white_list Helpers.get_instance_variable(self, :attributes_white_list, Set.new) end
attributes_white_list_add(*getters)
click to toggle source
# File lib/smooth_operator/attribute_assignment.rb, line 82 def attributes_white_list_add(*getters) attributes_white_list.merge getters.map(&:to_s) end
generate_parallel_connection()
click to toggle source
# File lib/smooth_operator/operator.rb, line 95 def generate_parallel_connection Operators::Typhoeus.generate_parallel_connection end
headers()
click to toggle source
# File lib/smooth_operator/operator.rb, line 61 def headers get_option :headers, {} end
make_the_call(http_verb, relative_path = '', data = {}, options = {}) { |remote_call| ... }
click to toggle source
# File lib/smooth_operator/operator.rb, line 65 def make_the_call(http_verb, relative_path = '', data = {}, options = {}) options = HelperMethods.populate_options(self, options) resource_path = resource_path(relative_path, options) http_verb, resource_path, data, options = before_request(http_verb, resource_path, data, options) params, data = *HelperMethods.strip_params(self, http_verb, data) operator = HelperMethods.get_me_an_operator(options) operator.make_the_call(http_verb, resource_path, params, data, options) do |remote_call| block_given? ? yield(remote_call) : remote_call end end
query_string(params)
click to toggle source
# File lib/smooth_operator/operator.rb, line 81 def query_string(params) params end
resource_path(relative_path, options)
click to toggle source
# File lib/smooth_operator/operator.rb, line 85 def resource_path(relative_path, options) resources_name = options[:resources_name] || self.resources_name if Helpers.present?(resources_name) Helpers.present?(relative_path) ? "#{resources_name}/#{relative_path}" : resources_name else relative_path.to_s end end
unknown_hash_class()
click to toggle source
# File lib/smooth_operator/attribute_assignment.rb, line 70 def unknown_hash_class get_option :unknown_hash_class, ::OpenStruct end