Class: TaskWarrior::SimpleTag
- Inherits:
-
Object
- Object
- TaskWarrior::SimpleTag
- Defined in:
- lib/twdeps/task_repository.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Instance Method Summary collapse
- #<<(task) ⇒ Object
-
#initialize(name) ⇒ SimpleTag
constructor
A new instance of SimpleTag.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/twdeps/task_repository.rb', line 5 def name @name end |
#tasks ⇒ Object (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 |