Class: Xignature::Token

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Token

Returns a new instance of Token.



11
12
13
# File 'lib/xignature.rb', line 11

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

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



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

def key
  @key
end

#secretObject (readonly)

Returns the value of attribute secret.



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

def secret
  @secret
end

Instance Method Details

#sign(request) ⇒ Object



15
16
17
# File 'lib/xignature.rb', line 15

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