Class: Shred::Commands::Console

Inherits:
Object
  • Object
show all
Defined in:
lib/shred/commands/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#thorObject (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