Class: Certman::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/certman/log.rb

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ Log

Returns a new instance of Log.



3
4
5
6
7
# File 'lib/certman/log.rb', line 3

def initialize(message)
  @pastel = Pastel.new
  @s = TTY::Spinner.new("[:spinner] #{message} (#{Aws.config[:region]})", output: $stdout)
  @s.auto_spin
end

Instance Method Details

#errorObject



13
14
15
# File 'lib/certman/log.rb', line 13

def error
  @s.error(@pastel.red('(error)'))
end

#successObject



9
10
11
# File 'lib/certman/log.rb', line 9

def success
  @s.success(@pastel.green('(successful)'))
end