Class: Mailflow::HeaderSet
- Inherits:
-
Object
- Object
- Mailflow::HeaderSet
show all
- Defined in:
- lib/mailflow/header_set.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(headers) ⇒ HeaderSet
Returns a new instance of HeaderSet.
5
6
7
|
# File 'lib/mailflow/header_set.rb', line 5
def initialize()
= .transform_keys(&:to_s).transform_keys(&:downcase)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object
17
18
19
|
# File 'lib/mailflow/header_set.rb', line 17
def method_missing(*args, &block)
.send(*args, &block)
end
|
Instance Attribute Details
Returns the value of attribute headers.
3
4
5
|
# File 'lib/mailflow/header_set.rb', line 3
def
end
|
Instance Method Details
#[](name) ⇒ Object
9
10
11
|
# File 'lib/mailflow/header_set.rb', line 9
def [](name)
[name.to_s.downcase]
end
|
#has_key?(key) ⇒ Boolean
13
14
15
|
# File 'lib/mailflow/header_set.rb', line 13
def has_key?(key)
.has_key?(key.to_s.downcase)
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
21
22
23
|
# File 'lib/mailflow/header_set.rb', line 21
def respond_to_missing?(method_name, include_private = false)
.respond_to?(method_name) || super
end
|