Class: DevArchive::Formatters::List
- Inherits:
-
Object
- Object
- DevArchive::Formatters::List
- Defined in:
- lib/dev_archive/formatters.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(metadata) ⇒ List
constructor
A new instance of List.
Constructor Details
#initialize(metadata) ⇒ List
9 10 11 |
# File 'lib/dev_archive/formatters.rb', line 9 def initialize() = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/dev_archive/formatters.rb', line 8 def end |
Class Method Details
.call(metadata) ⇒ Object
4 5 6 |
# File 'lib/dev_archive/formatters.rb', line 4 def self.call() new().call end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/dev_archive/formatters.rb', line 13 def call id = .fetch("id") = Time.parse(.fetch("timestamp")).strftime("%F %H:%M") = .fetch("message") = .split("\n").first Cfg.shell.puts([id, , ].join(" : ")) end |