Class: TaskWarrior::SimpleTag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ SimpleTag

Returns a new instance of SimpleTag.



7
8
9
10
# File 'lib/twdeps/task_repository.rb', line 7

def initialize(name)
  @name = name
  @tasks = []
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/twdeps/task_repository.rb', line 5

def name
  @name
end

#tasksObject (readonly)

Returns the value of attribute tasks.



5
6
7
# File 'lib/twdeps/task_repository.rb', line 5

def tasks
  @tasks
end

Instance Method Details

#<<(task) ⇒ Object



12
13
14
# File 'lib/twdeps/task_repository.rb', line 12

def <<(task)
  @tasks << task unless @tasks.include?(task)
end