Sha256: 6accebd812e326b847704760f60f839dbf08b4b6e0a4db839a4135d33c4d289f
Contents?: true
Size: 587 Bytes
Versions: 2
Compression:
Stored size: 587 Bytes
Contents
# encoding: utf-8 module Tudu # = Tudu::Task class Task # == task type [todo, doing, done] attr_accessor :type # == task name [uniq] attr_accessor :name # == init task with setting task type and task name. def initialize(type, name) @type, @name = type, name end def todo? @type == 'todos' end def doing? @type == 'doings' end def done? @type == 'dones' end def ==(other) return true if name == other.name && type == other.type false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tudu-0.0.7 | lib/task.rb |
tudu-0.0.6 | lib/task.rb |