Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## myapp.rb
- require 'main'
- include Main
- options = describe_options do
- version :v do
- puts App::Version
- exit
- end
- color :c
- end
- class App
- Version = "1.0.0".freeze
- end
- if options[:color] then
- puts "colorized!"
- else
- puts "black and white"
- end
- ## options/en.yaml
- ---
- version:
- Prints the version of the application and quits.
- color:
- Colorize output.
- help:
- This helptext.
Add Comment
Please, Sign In to add comment