Class: Misty::HTTP::Header
- Inherits:
-
Object
- Object
- Misty::HTTP::Header
show all
- Defined in:
- lib/misty/http/header.rb
Defined Under Namespace
Classes: ArgumentError, TypeError
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(param = {}) ⇒ Header
Returns a new instance of Header.
16
17
18
|
# File 'lib/misty/http/header.rb', line 16
def initialize(param = {})
@headers = param if self.class.valid?(param)
end
|
Instance Method Details
#add(param = {}) ⇒ Object
20
21
22
|
# File 'lib/misty/http/header.rb', line 20
def add(param = {})
@headers.merge!(param) if self.class.valid?(param)
end
|
#get ⇒ Object
24
25
26
|
# File 'lib/misty/http/header.rb', line 24
def get
@headers
end
|