class YARP::StatementsNode
Represents a set of statements contained within some scope.
foo; bar; baz ^^^^^^^^^^^^^
Attributes
body[R]
attr_reader body: Array
Public Class Methods
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File yarp/node.rb, line 9872 def accept(visitor) visitor.visit_statements_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File yarp/node.rb, line 9877 def child_nodes [*body] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File yarp/node.rb, line 9882 def comment_targets [*body] end
copy(**params)
click to toggle source
def copy: (**params) -> StatementsNode
# File yarp/node.rb, line 9887 def copy(**params) StatementsNode.new( params.fetch(:body) { body }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
inspect(inspector = NodeInspector.new)
click to toggle source
# File yarp/node.rb, line 9902 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector << "└── body: #{inspector.list("#{inspector.prefix} ", body)}" inspector.to_str end