class Prism::ItParametersNode
Представляет неявный набор параметров, задаваемый с помощью ключевого слова it внутри блока или лямбды.
-> { it + it }
^^^^^^^^^^^^^^ Открытые методы класса
# File lib/prism/node.rb, line 11369 def initialize(source, node_id, location, flags) @source = source @node_id = node_id @location = location @flags = flags end
Инициализирует новый узел ItParametersNode.
# File lib/prism/node.rb, line 11420 def self.type :it_parameters_node end
Возвращает символ, представляющий тип этого узла. См. Node::type.
Открытые методы экземпляра
# File lib/prism/node.rb, line 11426 def ===(other) other.is_a?(ItParametersNode) end
Реализует проверку равенства для case для узла. По сути, это оператор ==, но без сравнения значений расположений. Проверяется только наличие расположений.
# File lib/prism/node.rb, line 11377 def accept(visitor) visitor.visit_it_parameters_node(self) end
def accept: (Visitor visitor) -> void
# File lib/prism/node.rb, line 11382 def child_nodes [] end
def child_nodes: () -> Array
# File lib/prism/node.rb, line 11392 def comment_targets [] #: Array[Prism::node | Location] end
def comment_targets: () -> Array[Node | Location]
# File lib/prism/node.rb, line 11387 def compact_child_nodes [] end
def compact_child_nodes: () -> Array
# File lib/prism/node.rb, line 11397 def copy(node_id: self.node_id, location: self.location, flags: self.flags) ItParametersNode.new(source, node_id, location, flags) end
def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode
# File lib/prism/node.rb, line 11405
def deconstruct_keys(keys)
{ node_id: node_id, location: location }
end def deconstruct_keys: (Array keys) -> { node_id: Integer, location: Location }
# File lib/prism/node.rb, line 11410 def inspect InspectVisitor.compose(self) end
def inspect -> String
# File lib/prism/node.rb, line 11415 def type :it_parameters_node end
Возвращает символ, представляющий тип этого узла. См. Node#type.
Ruby Core © 1993–2025 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.