Module: HTTPX::Plugins::OAuth::OptionsMethods

Defined in:
lib/httpx/plugins/oauth.rb

Instance Method Summary collapse

Instance Method Details

#option_oauth_session(value) ⇒ Object



101
102
103
104
105
106
107
108
109
110
# File 'lib/httpx/plugins/oauth.rb', line 101

def option_oauth_session(value)
  case value
  when Hash
    OAuthSession.new(**value)
  when OAuthSession
    value
  else
    raise TypeError, ":oauth_session must be a #{OAuthSession}"
  end
end