Class: TaskList
- Inherits:
-
Object
- Object
- TaskList
- Defined in:
- lib/todoNotifier/TaskList.rb
Instance Attribute Summary collapse
-
#tasks ⇒ Object
Returns the value of attribute tasks.
Instance Method Summary collapse
-
#initialize ⇒ TaskList
constructor
A new instance of TaskList.
- #parseLine(l) ⇒ Object
Constructor Details
Instance Attribute Details
#tasks ⇒ Object
Returns the value of attribute tasks.
2 3 4 |
# File 'lib/todoNotifier/TaskList.rb', line 2 def tasks @tasks end |
Instance Method Details
#parseLine(l) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/todoNotifier/TaskList.rb', line 4 def parseLine(l) # Capitals denote a title, so block them (2 or more) if l =~ /^[:upper:]+$/ return end # Matches '-', '*', '#', tabs or 2 or more spaces as the beginning of a task if l =~ /^(-|\*|\#|\t|\s{2,})(.*)/ return $2 # Return the message end end |