Class: Project
- Extended by:
- Dependency::ClassMethod
- Includes:
- Dependency::Methods, ObservingContainer, ProjectFileWriter, Status
- Defined in:
- lib/gtd.rb,
lib/project_persistence.rb
Direct Known Subclasses
Constant Summary
Constants included from Status
Status::ACTIVE_STATES, Status::INACTIVE_STATES, Status::STATUS_ORDER, Status::STATUS_SYMBOLS, Status::SYMBOLS_STATUS
Instance Attribute Summary
Attributes inherited from Context
Instance Method Summary collapse
- #<<(item) ⇒ Object
-
#initialize(name, status = :processed) ⇒ Project
constructor
A new instance of Project.
- #to_s ⇒ Object
Methods included from ProjectFileWriter
Methods included from Status
#active, #directory_name, #inactive, #index, #symbol, #with_status
Methods included from ObservingContainer
Methods inherited from Context
Constructor Details
#initialize(name, status = :processed) ⇒ Project
Returns a new instance of Project.
65 66 67 68 69 |
# File 'lib/gtd.rb', line 65 def initialize(name,status=:processed) super(name) @status = status @infos = [] end |
Instance Method Details
#<<(item) ⇒ Object
70 71 72 73 74 |
# File 'lib/gtd.rb', line 70 def <<(action) log "Setting project #{self} for action #{action}" @actions << action action.project = self end |
#to_s ⇒ Object
75 76 77 |
# File 'lib/gtd.rb', line 75 def to_s "#{@status.id2name.capitalize} project #{@name}:\n " + @actions.join("\n ") end |