Class: SexpCliTools::Cli
- Inherits:
-
Thor
- Object
- Thor
- SexpCliTools::Cli
- Defined in:
- lib/sexp_cli_tools/cli.rb
Instance Method Summary collapse
Instance Method Details
#find(requested_sexp_matcher, *matcher_params) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/sexp_cli_tools/cli.rb', line 13 def find(requested_sexp_matcher, *matcher_params) glob = [:include] sexp_matcher = SexpCliTools::MATCHERS[requested_sexp_matcher] Pathname.glob(glob).each do |path| puts path.to_s if sexp_matcher.satisfy?(RubyParser.new.parse(path.read), *matcher_params) end end |