Class: Smt::Display
- Inherits:
-
Object
- Object
- Smt::Display
- Defined in:
- lib/smt/display.rb
Class Method Summary collapse
Class Method Details
.show(entry, format, max_length, time) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/smt/display.rb', line 5 def self.show(entry, format, max_length, time) time_display = time.in_time_zone(entry[:time_zone]).strftime(format) formatted_time_zone = time.strftime(entry[:label]).rjust(max_length) formatted_time_display = time_display puts "#{formatted_time_zone} #{formatted_time_display}".colorize(entry[:color].to_sym) end |