method

visit_if_node

rails latest stable - Class: RailInspector::Visitor::FrameworkDefault::VersionedConfig

Method not available on this version

This method is only available on newer versions. The first available version (v8.1.1) is shown here.

visit_if_node(node)
public

No documentation available.

# File tools/rail_inspector/lib/rail_inspector/visitor/framework_default.rb, line 41
          def visit_if_node(node)
            unless new_framework = respond_to_framework?(node.predicate)
              return visit_child_nodes(node)
            end

            if ENV["STRICT"] && current_framework
              raise "Potentially nested framework? Current: '#{current_framework}', found: '#{new_framework}'"
            end

            @framework_stack << new_framework
            visit_child_nodes(node)
            @framework_stack.pop
          end