Class: FluentdRegexpTester::CLI
- Inherits:
-
Thor
- Object
- Thor
- FluentdRegexpTester::CLI
- Defined in:
- lib/fluentd_regexp_tester/cli.rb
Instance Method Summary collapse
Instance Method Details
#test(regexp, input) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fluentd_regexp_tester/cli.rb', line 11 def test(regexp, input) error, parsed, parsed_time = FluentdRegexpTester.parse(input, regexp) if error != nil STDERR.puts error exit! end if parsed == nil STDERR.puts "Failed to parse '#{input}' with '#{regexp}'" exit! end puts parsed.inspect puts parsed_time.to_s end |
#version ⇒ Object
26 27 28 |
# File 'lib/fluentd_regexp_tester/cli.rb', line 26 def version puts FluentdRegexpTester::VERSION end |