Class: PivotalDoc::Release
- Inherits:
-
Object
- Object
- PivotalDoc::Release
- Includes:
- Work
- Defined in:
- lib/pivotal_doc/release.rb
Instance Attribute Summary collapse
-
#iteration ⇒ Object
readonly
Returns the value of attribute iteration.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
-
#initialize(project, iteration = nil) ⇒ Release
constructor
A new instance of Release.
- #latest_iteration ⇒ Object
- #me ⇒ Object
- #name ⇒ Object
Methods included from Work
#bugs, #chores, #features, #project_name, #stories
Constructor Details
#initialize(project, iteration = nil) ⇒ Release
8 9 10 11 |
# File 'lib/pivotal_doc/release.rb', line 8 def initialize(project, iteration=nil) @project= project @iteration= (iteration || latest_iteration) end |
Instance Attribute Details
#iteration ⇒ Object (readonly)
Returns the value of attribute iteration.
6 7 8 |
# File 'lib/pivotal_doc/release.rb', line 6 def iteration @iteration end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'lib/pivotal_doc/release.rb', line 5 def project @project end |
Instance Method Details
#latest_iteration ⇒ Object
21 22 23 |
# File 'lib/pivotal_doc/release.rb', line 21 def latest_iteration PT::Iteration.done(@project, :offset=>'-1').first end |
#me ⇒ Object
13 14 15 |
# File 'lib/pivotal_doc/release.rb', line 13 def me @me ||= self.iteration.stories.detect{|s| s.story_type.downcase=='release'} if self.iteration.stories end |
#name ⇒ Object
17 18 19 |
# File 'lib/pivotal_doc/release.rb', line 17 def name me.name if me.respond_to?(:name) end |