Class: Shipper::Logger

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/shipper/logger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLogger

Returns a new instance of Logger.



11
12
13
# File 'lib/shipper/logger.rb', line 11

def initialize
  @io_splitter = '#' * 5
end

Instance Attribute Details

#io_splitterObject (readonly)

Returns the value of attribute io_splitter.



9
10
11
# File 'lib/shipper/logger.rb', line 9

def io_splitter
  @io_splitter
end

Instance Method Details

#bold(phrase) ⇒ Object



19
20
21
# File 'lib/shipper/logger.rb', line 19

def bold(phrase)
  puts "# #{phrase}".bold.yellow
end

#error(phrase) ⇒ Object



23
24
25
# File 'lib/shipper/logger.rb', line 23

def error(phrase)
  puts "# #{phrase}".bold.red
end

#headline(phrase) ⇒ Object



15
16
17
# File 'lib/shipper/logger.rb', line 15

def headline(phrase)
  puts "##### #{phrase}".bold.green
end

#puts(phrase) ⇒ Object



27
28
29
# File 'lib/shipper/logger.rb', line 27

def puts(phrase)
  super(phrase)
end

#success!Object



31
32
33
# File 'lib/shipper/logger.rb', line 31

def success!
  puts '# Success!'.green
end