class AppRelease::Console
Public Class Methods
danger(text)
click to toggle source
# File lib/app_release/console.rb, line 21 def self.danger(text) new(text, :red).print end
log(text)
click to toggle source
# File lib/app_release/console.rb, line 9 def self.log(text) new(text, nil).print end
new(text, color = nil)
click to toggle source
# File lib/app_release/console.rb, line 25 def initialize(text, color = nil) @text = text @color = color end
print(text, color = nil)
click to toggle source
# File lib/app_release/console.rb, line 5 def self.print(text, color = nil) new(text, color).print end
success(text)
click to toggle source
# File lib/app_release/console.rb, line 13 def self.success(text) new(text, :green).print end
warning(text)
click to toggle source
# File lib/app_release/console.rb, line 17 def self.warning(text) new(text, :yellow).print end
Public Instance Methods
print()
click to toggle source
# File lib/app_release/console.rb, line 30 def print puts @text.colorize(@color) end