Class: Ora::Cli::Print
- Inherits:
-
Object
- Object
- Ora::Cli::Print
- Defined in:
- lib/ora/cli/print.rb
Instance Method Summary collapse
- #green(text) ⇒ Object
-
#initialize(silent = false) ⇒ Print
constructor
A new instance of Print.
- #inline(text) ⇒ Object
- #plain(text) ⇒ Object
- #red(text) ⇒ Object
Constructor Details
#initialize(silent = false) ⇒ Print
Returns a new instance of Print.
3 4 5 |
# File 'lib/ora/cli/print.rb', line 3 def initialize(silent = false) @silent = silent end |
Instance Method Details
#green(text) ⇒ Object
17 18 19 20 |
# File 'lib/ora/cli/print.rb', line 17 def green text puts "\e[32m#{text}\e[0m" unless ignore? text text end |
#inline(text) ⇒ Object
7 8 9 10 |
# File 'lib/ora/cli/print.rb', line 7 def inline text print text unless ignore? text text end |
#plain(text) ⇒ Object
12 13 14 15 |
# File 'lib/ora/cli/print.rb', line 12 def plain text puts text unless ignore? text text end |
#red(text) ⇒ Object
22 23 24 25 |
# File 'lib/ora/cli/print.rb', line 22 def red text puts "\e[31m#{text}\e[0m" unless ignore? text text end |