Class: Dkim::DkimHeader
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Attributes inherited from Header
Instance Method Summary collapse
- #[](k) ⇒ Object
- #[]=(k, v) ⇒ Object
-
#initialize(values = {}) ⇒ DkimHeader
constructor
A new instance of DkimHeader.
- #value ⇒ Object
Methods inherited from Header
#canonical_relaxed, #canonical_simple, parse, #relaxed_key, #relaxed_value
Methods included from Canonicalizable
Constructor Details
#initialize(values = {}) ⇒ DkimHeader
Returns a new instance of DkimHeader.
9 10 11 12 |
# File 'lib/dkim/dkim_header.rb', line 9 def initialize values={} self.key = 'DKIM-Signature' @list = TagValueList.new values end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
8 9 10 |
# File 'lib/dkim/dkim_header.rb', line 8 def list @list end |
Instance Method Details
#[](k) ⇒ Object
16 17 18 |
# File 'lib/dkim/dkim_header.rb', line 16 def [] k encoder_for(k).decode(@list[k]) end |
#[]=(k, v) ⇒ Object
19 20 21 |
# File 'lib/dkim/dkim_header.rb', line 19 def []= k, v @list[k] = encoder_for(k).encode(v) end |
#value ⇒ Object
13 14 15 |
# File 'lib/dkim/dkim_header.rb', line 13 def value " #{@list}" end |