Class: Task
Instance Attribute Summary collapse
-
#_d ⇒ Object
Returns the value of attribute _d.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ Task
constructor
A new instance of Task.
- #notify ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(text) ⇒ Task
Returns a new instance of Task.
6 7 8 9 |
# File 'lib/todoNotifier/Task.rb', line 6 def initialize(text) self._d = text self.text = text.strip end |
Instance Attribute Details
#_d ⇒ Object
Returns the value of attribute _d.
2 3 4 |
# File 'lib/todoNotifier/Task.rb', line 2 def _d @_d end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/todoNotifier/Task.rb', line 3 def text @text end |
Instance Method Details
#notify ⇒ Object
11 12 13 |
# File 'lib/todoNotifier/Task.rb', line 11 def notify() TerminalNotifier.notify(self.text, :title => 'TODO', :group => Process.pid) end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/todoNotifier/Task.rb', line 15 def to_s() self.text end |