Class: Synthra::Parser::AST::HeaderDirective
- Inherits:
-
DirectiveNode
- Object
- Node
- DirectiveNode
- Synthra::Parser::AST::HeaderDirective
- Defined in:
- lib/synthra/parser/ast.rb
Overview
Header directive
Sets a custom HTTP header for the response.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key:, value:, line: nil) ⇒ HeaderDirective
constructor
Create a new HeaderDirective.
Constructor Details
#initialize(key:, value:, line: nil) ⇒ HeaderDirective
Create a new HeaderDirective
1249 1250 1251 1252 1253 |
# File 'lib/synthra/parser/ast.rb', line 1249 def initialize(key:, value:, line: nil) super(line: line) @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
1234 1235 1236 |
# File 'lib/synthra/parser/ast.rb', line 1234 def key @key end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
1240 1241 1242 |
# File 'lib/synthra/parser/ast.rb', line 1240 def value @value end |