Class: Protocol::HTTP::Header::Digest::Entry

Inherits:
Struct
  • Object
show all
Defined in:
lib/protocol/http/header/digest.rb

Overview

A single digest entry in the Digest header.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(algorithm, value) ⇒ Entry

Create a new digest entry.



37
38
39
# File 'lib/protocol/http/header/digest.rb', line 37

def initialize(algorithm, value)
  super(algorithm.downcase, value)
end

Instance Attribute Details

#algorithmObject

Returns the value of attribute algorithm

Returns:

  • (Object)

    the current value of algorithm



32
33
34
# File 'lib/protocol/http/header/digest.rb', line 32

def algorithm
  @algorithm
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



32
33
34
# File 'lib/protocol/http/header/digest.rb', line 32

def value
  @value
end

Instance Method Details

#to_sObject

Convert the entry to its string representation.



44
45
46
# File 'lib/protocol/http/header/digest.rb', line 44

def to_s
  "#{algorithm}=#{value}"
end