class RestClientWrapper::Authenticator::Custom
Constants
- TYPE
Attributes
type[R]
Public Class Methods
new(**config)
click to toggle source
# File lib/rest_client_wrapper/authenticators/custom.rb, line 35 def initialize(**config) self.type = config[:type] self.auth_param = config[:auth_param] end
Public Instance Methods
auth_param=(auth_param)
click to toggle source
# File lib/rest_client_wrapper/authenticators/custom.rb, line 51 def auth_param=(auth_param) raise TypeError, "Request auth_param is not a hash" unless auth_param.is_a?(Hash) @auth_param = auth_param end
generate_auth()
click to toggle source
# File lib/rest_client_wrapper/authenticators/custom.rb, line 40 def generate_auth return @auth_param end
type=(type)
click to toggle source
# File lib/rest_client_wrapper/authenticators/custom.rb, line 44 def type=(type) raise TypeError, "Request type parameter is not a symbol" unless type.is_a?(Symbol) raise ArgumentError, "Not a valid http method" unless TYPE.include?(type) @type = type end