Class: Lemon::CLI::OBrother
Overview
The ol' "Sing it, Brother" Command.
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#command_run(argv) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/lemon/cli/obrother.rb', line 12 def command_run(argv) if argv.any?{ |a| a.downcase == 'good' } show_ascii_art else puts "No, they are GOOD!" end end |
#show_ascii_art ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/lemon/cli/obrother.rb', line 21 def show_ascii_art string = File.read(File.dirname(__FILE__) + '/lemon.ascii') begin require 'ansi' puts string.ansi(:yellow) rescue LoadError puts string end end |