Class: YARP::SourceFileNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::SourceFileNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents the use of the ‘__FILE__` keyword.
__FILE__
^^^^^^^^
Instance Attribute Summary collapse
-
#filepath ⇒ Object
readonly
attr_reader filepath: String.
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(filepath, location) ⇒ SourceFileNode
constructor
def initialize: (filepath: String, location: Location) -> void.
Constructor Details
#initialize(filepath, location) ⇒ SourceFileNode
def initialize: (filepath: String, location: Location) -> void
5613 5614 5615 5616 |
# File 'lib/yarp/node.rb', line 5613 def initialize(filepath, location) @filepath = filepath @location = location end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
attr_reader filepath: String
5610 5611 5612 |
# File 'lib/yarp/node.rb', line 5610 def filepath @filepath end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
5619 5620 5621 |
# File 'lib/yarp/node.rb', line 5619 def accept(visitor) visitor.visit_source_file_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
5624 5625 5626 |
# File 'lib/yarp/node.rb', line 5624 def child_nodes [] end |