Class: Tracker::Project
- Inherits:
-
Object
- Object
- Tracker::Project
- Defined in:
- lib/tracker-git/project.rb
Instance Attribute Summary collapse
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#tracker_token ⇒ Object
readonly
Returns the value of attribute tracker_token.
Instance Method Summary collapse
- #deliver(story) ⇒ Object
- #finished ⇒ Object
-
#initialize(tracker_token, project_id) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(tracker_token, project_id) ⇒ Project
Returns a new instance of Project.
8 9 10 11 12 13 14 |
# File 'lib/tracker-git/project.rb', line 8 def initialize(tracker_token, project_id) @tracker_token = tracker_token @project_id = project_id PivotalTracker::Client.token = tracker_token PivotalTracker::Client.use_ssl = true end |
Instance Attribute Details
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/tracker-git/project.rb', line 6 def project_id @project_id end |
#tracker_token ⇒ Object (readonly)
Returns the value of attribute tracker_token.
6 7 8 |
# File 'lib/tracker-git/project.rb', line 6 def tracker_token @tracker_token end |
Instance Method Details
#deliver(story) ⇒ Object
20 21 22 |
# File 'lib/tracker-git/project.rb', line 20 def deliver(story) story.update(current_state: "delivered") end |
#finished ⇒ Object
16 17 18 |
# File 'lib/tracker-git/project.rb', line 16 def finished _project.stories.all(state: "finished", story_type: ['bug', 'feature']) end |