Class: Signature::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/signature/token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Token

Returns a new instance of Token.



5
6
7
# File 'lib/signature/token.rb', line 5

def initialize(key, secret)
  @key, @secret = key, secret
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



3
4
5
# File 'lib/signature/token.rb', line 3

def key
  @key
end

#secretObject (readonly)

Returns the value of attribute secret.



3
4
5
# File 'lib/signature/token.rb', line 3

def secret
  @secret
end

Instance Method Details

#sign(request) ⇒ Object



9
10
11
# File 'lib/signature/token.rb', line 9

def sign(request)
  request.sign(self)
end