Class: Mutant::Reporter::CLI::Printer::Config::Runner::Walker

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/reporter/cli/printer/config.rb

Overview

Walker for all ast nodes

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root, block) ⇒ undefined

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize and run walker

Parameters:

  • root (Parser::AST::Node)
  • block (#call(node))


93
94
95
96
# File 'lib/mutant/reporter/cli/printer/config.rb', line 93

def initialize(root, block)
  @root, @block = root, block
  dispatch(root)
end

Class Method Details

.run(root, &block) ⇒ self

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Run walkter

Parameters:

  • root (Parser::AST::Node)

Returns:

  • (self)


77
78
79
80
# File 'lib/mutant/reporter/cli/printer/config.rb', line 77

def self.run(root, &block)
  new(root, block)
  self
end