Class: SyntaxTree::CLI::Match

Inherits:
Action
  • Object
show all
Defined in:
lib/syntax_tree/cli.rb

Overview

An action of the CLI that outputs a pattern-matching Ruby expression that would match the input given.

Instance Method Summary collapse

Methods inherited from Action

#failure, #success

Instance Method Details

#run(handler, _filepath, source) ⇒ Object



131
132
133
# File 'lib/syntax_tree/cli.rb', line 131

def run(handler, _filepath, source)
  puts handler.parse(source).construct_keys
end