diff --git a/lib/erb/formatter/command_line.rb b/lib/erb/formatter/command_line.rb index 26c9ca2..51842d8 100644 --- a/lib/erb/formatter/command_line.rb +++ b/lib/erb/formatter/command_line.rb @@ -45,6 +45,11 @@ def initialize(argv, stdin: $stdin) puts parser exit end + + parser.on("-v", "--version", "Show ERB::Formatter version number and quit") do + puts "ERB::Formatter #{ERB::Formatter::VERSION}" + exit + end end.parse!(@argv) end