Class: Shred::Commands::Console
- Inherits:
-
Object
- Object
- Shred::Commands::Console
- Defined in:
- lib/shred/commands/base.rb
Instance Attribute Summary collapse
-
#thor ⇒ Object
readonly
Returns the value of attribute thor.
Instance Method Summary collapse
-
#initialize(thor: nil) ⇒ Console
constructor
A new instance of Console.
- #say_err(msg) ⇒ Object
- #say_ok(msg) ⇒ Object
- #say_trace(msg) ⇒ Object
Constructor Details
#initialize(thor: nil) ⇒ Console
Returns a new instance of Console.
116 117 118 |
# File 'lib/shred/commands/base.rb', line 116 def initialize(thor: nil) @thor = thor end |
Instance Attribute Details
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
114 115 116 |
# File 'lib/shred/commands/base.rb', line 114 def thor @thor end |
Instance Method Details
#say_err(msg) ⇒ Object
128 129 130 |
# File 'lib/shred/commands/base.rb', line 128 def say_err(msg) thor.say_status(:ERR, msg, :red) end |
#say_ok(msg) ⇒ Object
124 125 126 |
# File 'lib/shred/commands/base.rb', line 124 def say_ok(msg) thor.say_status(:OK, msg, :blue) end |
#say_trace(msg) ⇒ Object
120 121 122 |
# File 'lib/shred/commands/base.rb', line 120 def say_trace(msg) thor.say_status(:TRACE, msg, :green) end |