instance method
Prism::Translation::Ripper#command?
command?(node)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 1174
def command?(node)
node.is_a?(CallNode) &&
node.opening_loc.nil? &&
(!node.arguments.nil? || node.block.is_a?(BlockArgumentNode)) &&
!BINARY_OPERATORS.include?(node.name)
end
Returns true if the given node is a command node.