Class: Useless::Doc::Header
- Inherits:
-
Object
- Object
- Useless::Doc::Header
- Defined in:
- lib/useless/doc/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.
18 19 20 21 |
# File 'lib/useless/doc/header.rb', line 18 def initialize(attrs = {}) @key = attrs[:key] @description = attrs[:description] end |
Instance Attribute Details
#description ⇒ String
Returns a description of the header.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/useless/doc/header.rb', line 13 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.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/useless/doc/header.rb', line 13 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 |