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
5566 5567 5568 5569 |
# File 'lib/yarp/node.rb', line 5566 def initialize(filepath, location) @filepath = filepath @location = location end |
Instance Attribute Details
#filepath ⇒ Object (readonly)
attr_reader filepath: String
5563 5564 5565 |
# File 'lib/yarp/node.rb', line 5563 def filepath @filepath end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
5572 5573 5574 |
# File 'lib/yarp/node.rb', line 5572 def accept(visitor) visitor.visit_source_file_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
5578 5579 5580 |
# File 'lib/yarp/node.rb', line 5578 def child_nodes [] end |