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.



121
122
123
# File 'lib/shred/commands/base.rb', line 121

def initialize(thor: nil)
  @thor = thor
end

Instance Attribute Details

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