instance method
Prism::DSL#when_node
when_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, conditions: [], then_keyword_loc: nil, statements: nil)
lib/prism/dsl.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/dsl.rb, line 815
def when_node(source: default_source, node_id: 0, location: default_location, flags: 0, keyword_loc: location, conditions: [], then_keyword_loc: nil, statements: nil)
WhenNode.new(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements)
end
Create a new WhenNode node.