Class: Task

Inherits:
Object
  • Object
show all
Includes:
SmarterDates
Defined in:
lib/todoNotifier/Task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#_dObject

Returns the value of attribute _d.



2
3
4
# File 'lib/todoNotifier/Task.rb', line 2

def _d
  @_d
end

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/todoNotifier/Task.rb', line 3

def text
  @text
end

Instance Method Details

#notifyObject



11
12
13
# File 'lib/todoNotifier/Task.rb', line 11

def notify()
  TerminalNotifier.notify(self.text, :title => 'TODO', :group => Process.pid)
end

#to_sObject



15
16
17
# File 'lib/todoNotifier/Task.rb', line 15

def to_s()
  self.text
end