class Tudu::Task

Tudu::Task

Attributes

name[RW]

task name [uniq]

type[RW]

task type [todo, doing, done]

Public Class Methods

new(type, name) click to toggle source

init task with setting task type and task name.

# File lib/task.rb, line 12
def initialize(type, name)
  @type, @name = type, name
end

Public Instance Methods

==(other) click to toggle source
# File lib/task.rb, line 28
def ==(other)
  return true if name == other.name && type == other.type
  false
end
doing?() click to toggle source
# File lib/task.rb, line 20
def doing?
  @type == 'doings'
end
done?() click to toggle source
# File lib/task.rb, line 24
def done?
  @type == 'dones'
end
todo?() click to toggle source
# File lib/task.rb, line 16
def todo?
  @type == 'todos'
end