Skip to content

Commit

Permalink
Add command line flag to show current version
Browse files Browse the repository at this point in the history
  • Loading branch information
cseelus committed Jan 17, 2023
1 parent fe1777b commit 171b285
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/erb/formatter/command_line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,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

Expand Down

0 comments on commit 171b285

Please sign in to comment.