Class: OAuth::Signature::Base
- Defined in:
- lib/simple_mapper/default_plugins/oauth.rb
Instance Method Summary collapse
-
#initialize(request, options = {}, &block) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(request, options = {}, &block) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/simple_mapper/default_plugins/oauth.rb', line 10 def initialize(request, = {}, &block) raise TypeError unless request.kind_of?(OAuth::RequestProxy::Base) @request = request if block_given? @token_secret, @consumer_secret = yield block.arity == 1 ? token : [token, consumer_key,nonce,request.] else @consumer_secret = [:consumer].respond_to?(:secret) ? [:consumer].secret : [:consumer] @token_secret = [:token].respond_to?(:secret) ? [:token].secret : ([:token] || '') end end |