Class: HttpSignatures::Key

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, secret:) ⇒ Key

Returns a new instance of Key.



4
5
6
7
# File 'lib/http_signatures/key.rb', line 4

def initialize(id:, secret:)
  @id = id
  @secret = secret
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#secretObject (readonly)

Returns the value of attribute secret.



10
11
12
# File 'lib/http_signatures/key.rb', line 10

def secret
  @secret
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
15
16
# File 'lib/http_signatures/key.rb', line 12

def ==(other)
  self.class == other.class &&
    self.id == other.id &&
    self.secret == other.secret
end