Class: Synthra::Parser::AST::ApiDefinitionNode
- Defined in:
- lib/synthra/parser/ast.rb
Overview
API definition node
Represents an API endpoint definition with HTTP method, path, and response scenarios.
Instance Attribute Summary collapse
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#scenarios ⇒ Object
readonly
Returns the value of attribute scenarios.
Instance Method Summary collapse
-
#initialize(method:, path:, scenarios: [], line: nil) ⇒ ApiDefinitionNode
constructor
Create a new ApiDefinitionNode.
Constructor Details
#initialize(method:, path:, scenarios: [], line: nil) ⇒ ApiDefinitionNode
Create a new ApiDefinitionNode
895 896 897 898 899 900 |
# File 'lib/synthra/parser/ast.rb', line 895 def initialize(method:, path:, scenarios: [], line: nil) super(line: line) @method = method @path = path @scenarios = scenarios end |
Instance Attribute Details
#method ⇒ Object (readonly)
Returns the value of attribute method.
873 874 875 |
# File 'lib/synthra/parser/ast.rb', line 873 def method @method end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
879 880 881 |
# File 'lib/synthra/parser/ast.rb', line 879 def path @path end |
#scenarios ⇒ Object (readonly)
Returns the value of attribute scenarios.
885 886 887 |
# File 'lib/synthra/parser/ast.rb', line 885 def scenarios @scenarios end |