Class: Todo::Data::Parser
- Inherits:
-
Struct
- Object
- Struct
- Todo::Data::Parser
- Includes:
- Helpers::Hash::Compact
- Defined in:
- lib/todo/data/parser.rb
Constant Summary collapse
- STATUS =
/^(#{STATUSES.values.join('|')}){1}\s*/
- ID =
/\s*\[(\d+)\]/
- TAG =
/\s*([^\s]+):([^\s]+)/
Instance Attribute Summary collapse
-
#line ⇒ Object
Returns the value of attribute line.
Instance Method Summary collapse
Methods included from Helpers::Hash::Compact
Instance Attribute Details
#line ⇒ Object
Returns the value of attribute line
6 7 8 |
# File 'lib/todo/data/parser.rb', line 6 def line @line end |
Instance Method Details
#parse ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/todo/data/parser.rb', line 13 def parse { id: id, text: text, status: status, tags: , } end |