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.
121 122 123 |
# File 'lib/shred/commands/base.rb', line 121 def initialize(thor: nil) @thor = thor end |
Instance Attribute Details
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
119 120 121 |
# File 'lib/shred/commands/base.rb', line 119 def thor @thor end |
Instance Method Details
#say_err(msg) ⇒ Object
133 134 135 |
# File 'lib/shred/commands/base.rb', line 133 def say_err(msg) thor.say_status(:ERR, msg, :red) end |
#say_ok(msg) ⇒ Object
129 130 131 |
# File 'lib/shred/commands/base.rb', line 129 def say_ok(msg) thor.say_status(:OK, msg, :blue) end |
#say_trace(msg) ⇒ Object
125 126 127 |
# File 'lib/shred/commands/base.rb', line 125 def say_trace(msg) thor.say_status(:TRACE, msg, :green) end |