Class: PivotalTracker::Iteration

Inherits:
Object
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/pivotal-tracker/iteration.rb

Class Method Summary collapse

Class Method Details

.all(project, options = {}) ⇒ Object



6
7
8
9
# File 'lib/pivotal-tracker/iteration.rb', line 6

def all(project, options={})
  params = PivotalTracker.encode_options(options)
  parse(Client.connection["/projects/#{project.id}/iterations#{params}"].get)
end

.backlog(project, options = {}) ⇒ Object



21
22
23
24
# File 'lib/pivotal-tracker/iteration.rb', line 21

def backlog(project, options={})
  params = PivotalTracker.encode_options(options)
  parse(Client.connection["/projects/#{project.id}/iterations/backlog#{params}"].get)
end

.current(project) ⇒ Object



11
12
13
14
# File 'lib/pivotal-tracker/iteration.rb', line 11

def current(project)
  array = parse(Client.connection["projects/#{project.id}/iterations/current"].get)
  array.first if array
end

.done(project, options = {}) ⇒ Object



16
17
18
19
# File 'lib/pivotal-tracker/iteration.rb', line 16

def done(project, options={})
  params = PivotalTracker.encode_options(options)
  parse(Client.connection["/projects/#{project.id}/iterations/done#{params}"].get)
end