Class: OpenapiContracts::Doc::Header
- Inherits:
-
Object
- Object
- OpenapiContracts::Doc::Header
- Defined in:
- lib/openapi_contracts/doc/header.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, data) ⇒ Header
constructor
A new instance of Header.
- #required? ⇒ Boolean
- #schema ⇒ Object
Constructor Details
#initialize(name, data) ⇒ Header
Returns a new instance of Header.
5 6 7 8 |
# File 'lib/openapi_contracts/doc/header.rb', line 5 def initialize(name, data) @name = name @data = data end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/openapi_contracts/doc/header.rb', line 3 def name @name end |
Instance Method Details
#required? ⇒ Boolean
10 11 12 |
# File 'lib/openapi_contracts/doc/header.rb', line 10 def required? @data['required'] end |
#schema ⇒ Object
14 15 16 |
# File 'lib/openapi_contracts/doc/header.rb', line 14 def schema @data['schema'] end |