Guest User

Untitled

a guest
May 21st, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. ## myapp.rb
  2. require 'main'
  3. include Main
  4.  
  5. options = describe_options do
  6. version :v do
  7. puts App::Version
  8. exit
  9. end
  10. color :c
  11. end
  12.  
  13. class App
  14. Version = "1.0.0".freeze
  15. end
  16.  
  17. if options[:color] then
  18. puts "colorized!"
  19. else
  20. puts "black and white"
  21. end
  22.  
  23. ## options/en.yaml
  24. ---
  25. version:
  26. Prints the version of the application and quits.
  27. color:
  28. Colorize output.
  29. help:
  30. This helptext.
Add Comment
Please, Sign In to add comment