Class: Shipper::Logger
- Inherits:
-
Object
- Object
- Shipper::Logger
- Includes:
- Singleton
- Defined in:
- lib/shipper/logger.rb
Instance Attribute Summary collapse
-
#io_splitter ⇒ Object
readonly
Returns the value of attribute io_splitter.
Instance Method Summary collapse
- #bold(phrase) ⇒ Object
- #error(phrase) ⇒ Object
- #headline(phrase) ⇒ Object
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
- #puts(phrase) ⇒ Object
- #success! ⇒ Object
Constructor Details
#initialize ⇒ Logger
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_splitter ⇒ Object (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 |