Class: Kdeploy::ConsoleOutput
Overview
Console output implementation
Instance Attribute Summary collapse
-
#pastel ⇒ Object
readonly
Returns the value of attribute pastel.
Instance Method Summary collapse
-
#initialize ⇒ ConsoleOutput
constructor
A new instance of ConsoleOutput.
- #write(message) ⇒ Object
- #write_error(message) ⇒ Object
- #write_line(message) ⇒ Object
Constructor Details
#initialize ⇒ ConsoleOutput
Returns a new instance of ConsoleOutput.
23 24 25 26 |
# File 'lib/kdeploy/output.rb', line 23 def initialize super @pastel = Pastel.new end |
Instance Attribute Details
#pastel ⇒ Object (readonly)
Returns the value of attribute pastel.
40 41 42 |
# File 'lib/kdeploy/output.rb', line 40 def pastel @pastel end |
Instance Method Details
#write(message) ⇒ Object
28 29 30 |
# File 'lib/kdeploy/output.rb', line 28 def write() print() end |
#write_error(message) ⇒ Object
36 37 38 |
# File 'lib/kdeploy/output.rb', line 36 def write_error() puts(@pastel.red()) end |
#write_line(message) ⇒ Object
32 33 34 |
# File 'lib/kdeploy/output.rb', line 32 def write_line() puts() end |