Class: V2Intuity::Headers::Header
- Inherits:
-
Object
- Object
- V2Intuity::Headers::Header
- Defined in:
- lib/v2_intuity/headers/header.rb
Direct Known Subclasses
Constant Summary collapse
- HEADERS =
{ accept: 'accept', content_type: 'content_type' }.freeze
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Header
constructor
A new instance of Header.
- #to_hash ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Header
Returns a new instance of Header.
7 8 9 10 |
# File 'lib/v2_intuity/headers/header.rb', line 7 def initialize( = {}) @name = [:name] @value = [:value] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/v2_intuity/headers/header.rb', line 4 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/v2_intuity/headers/header.rb', line 4 def value @value end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 |
# File 'lib/v2_intuity/headers/header.rb', line 12 def to_hash { @name.to_sym => @value } end |