Class: Synthra::Parser::AST::ReferenceNode
- Defined in:
- lib/synthra/parser/ast.rb
Overview
Reference to another schema's field
Represents a Ref() expression that references a field from another schema. Used for cross-schema relationships.
Instance Attribute Summary collapse
-
#field_path ⇒ Object
readonly
Returns the value of attribute field_path.
-
#schema_name ⇒ Object
readonly
Returns the value of attribute schema_name.
Instance Method Summary collapse
-
#initialize(schema_name:, field_path:, line: nil) ⇒ ReferenceNode
constructor
Create a new ReferenceNode.
-
#to_s ⇒ String
Get full reference string.
Constructor Details
#initialize(schema_name:, field_path:, line: nil) ⇒ ReferenceNode
Create a new ReferenceNode
510 511 512 513 514 |
# File 'lib/synthra/parser/ast.rb', line 510 def initialize(schema_name:, field_path:, line: nil) super(line: line) @schema_name = schema_name @field_path = field_path end |
Instance Attribute Details
#field_path ⇒ Object (readonly)
Returns the value of attribute field_path.
501 502 503 |
# File 'lib/synthra/parser/ast.rb', line 501 def field_path @field_path end |
#schema_name ⇒ Object (readonly)
Returns the value of attribute schema_name.
495 496 497 |
# File 'lib/synthra/parser/ast.rb', line 495 def schema_name @schema_name end |
Instance Method Details
#to_s ⇒ String
Get full reference string
524 525 526 |
# File 'lib/synthra/parser/ast.rb', line 524 def to_s "#{schema_name}.#{field_path}" end |