Class: Todo::Format
- Inherits:
-
Struct
- Object
- Struct
- Todo::Format
- Includes:
- Helpers::Hash::Format, Helpers::Object::Presence
- Defined in:
- lib/todo/format.rb
Constant Summary collapse
- FORMATS =
{ full: [:status, :text, :tags, :id], short: [:status, :done_date, :text] }
Instance Attribute Summary collapse
-
#items ⇒ Object
Returns the value of attribute items.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
Methods included from Helpers::Hash::Format
Methods included from Helpers::Object::Presence
Instance Attribute Details
#items ⇒ Object
Returns the value of attribute items
6 7 8 |
# File 'lib/todo/format.rb', line 6 def items @items end |
#opts ⇒ Object
Returns the value of attribute opts
6 7 8 |
# File 'lib/todo/format.rb', line 6 def opts @opts end |
Instance Method Details
#apply ⇒ Object
14 15 16 |
# File 'lib/todo/format.rb', line 14 def apply items.map { |item| format(item) } end |