Class: Useless::Doc::Core::Header
- Inherits:
-
Object
- Object
- Useless::Doc::Core::Header
- Defined in:
- lib/useless/doc/core/header.rb
Overview
Documentation for an HTTP header, belonging either to the request or the response.
Instance Attribute Summary collapse
-
#description ⇒ String
A description of the header.
-
#key ⇒ String
The key of the header.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(attrs = {}) ⇒ Header
Returns a new instance of Header.
19 20 21 22 |
# File 'lib/useless/doc/core/header.rb', line 19 def initialize(attrs = {}) @key = attrs[:key] @description = attrs[:description] end |
Instance Attribute Details
#description ⇒ String
Returns a description of the header.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/useless/doc/core/header.rb', line 14 class Header attr_accessor :key, :description # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @key = attrs[:key] @description = attrs[:description] end end |
#key ⇒ String
Returns the key of the header.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/useless/doc/core/header.rb', line 14 class Header attr_accessor :key, :description # @param [Hash] attrs corresponds to the class's instance attributes. # def initialize(attrs = {}) @key = attrs[:key] @description = attrs[:description] end end |