Class: Tracker::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/tracker-git/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (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_tokenObject (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

#finishedObject



16
17
18
# File 'lib/tracker-git/project.rb', line 16

def finished
  _project.stories.all(state: "finished", story_type: ['bug', 'feature'])
end