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 |
# File 'lib/kdeploy/output.rb', line 23 def initialize @pastel = Pastel.new end |
Instance Attribute Details
#pastel ⇒ Object (readonly)
Returns the value of attribute pastel.
39 40 41 |
# File 'lib/kdeploy/output.rb', line 39 def pastel @pastel end |
Instance Method Details
#write(message) ⇒ Object
27 28 29 |
# File 'lib/kdeploy/output.rb', line 27 def write() print() end |
#write_error(message) ⇒ Object
35 36 37 |
# File 'lib/kdeploy/output.rb', line 35 def write_error() puts(@pastel.red()) end |
#write_line(message) ⇒ Object
31 32 33 |
# File 'lib/kdeploy/output.rb', line 31 def write_line() puts() end |