Class: ActionItem

Inherits:
Object
  • Object
show all
Defined in:
lib/startask.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s) ⇒ ActionItem

Returns a new instance of ActionItem.



13
14
15
16
# File 'lib/startask.rb', line 13

def initialize(s)
  @title = s
  @log = []
end

Instance Attribute Details

#logObject (readonly)

Returns the value of attribute log.



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

def log
  @log
end

Instance Method Details

#doneObject Also known as: completed



18
19
20
# File 'lib/startask.rb', line 18

def done()
  logit :completed
end

#startedObject



28
29
30
# File 'lib/startask.rb', line 28

def started()
  logit :started
end

#statusObject



32
33
34
# File 'lib/startask.rb', line 32

def status()
  @log.last
end

#status=(status) ⇒ Object



40
41
42
43
44
45
46
47
48
49
# File 'lib/startask.rb', line 40

def status=(status)
  
  case status
  when :done
    done()
  when :started
    started()
  end
  
end

#stoppedObject



36
37
38
# File 'lib/startask.rb', line 36

def stopped()
  logit :stopped
end

#to_sObject



24
25
26
# File 'lib/startask.rb', line 24

def to_s()
  @title
end