Module: Vimpack::Utils::Io
- Included in:
- Commands::Command, Process
- Defined in:
- lib/vimpack/utils/io.rb
Instance Method Summary collapse
- #die!(message = nil) ⇒ Object
- #exit_with_error!(message = nil, exit_code = 1) ⇒ Object
- #say(message, color = :green) ⇒ Object
- #scream(message) ⇒ Object
Instance Method Details
#die!(message = nil) ⇒ Object
13 14 15 16 |
# File 'lib/vimpack/utils/io.rb', line 13 def die!(=nil) scream() return Trollop::die USAGE end |
#exit_with_error!(message = nil, exit_code = 1) ⇒ Object
18 19 20 21 |
# File 'lib/vimpack/utils/io.rb', line 18 def exit_with_error!(=nil, exit_code=1) scream() unless .nil? exit(exit_code) end |
#say(message, color = :green) ⇒ Object
5 6 7 |
# File 'lib/vimpack/utils/io.rb', line 5 def say(, color=:green) puts .color(color) unless .nil? end |
#scream(message) ⇒ Object
9 10 11 |
# File 'lib/vimpack/utils/io.rb', line 9 def scream() say(, :red) end |