instance method
Prism::Translation::Ripper#visit_module_node
visit_module_node(node)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 2458
def visit_module_node(node)
constant_path =
if node.constant_path.is_a?(ConstantReadNode)
bounds(node.constant_path.location)
on_const_ref(on_const(node.constant_path.name.to_s))
else
visit(node.constant_path)
end
bodystmt = visit_body_node(node.constant_path.location, node.body, true)
bounds(node.location)
on_module(constant_path, bodystmt)
end
module Foo; end ^^^^^^^^^^^^^^^