Class: PivotalSync::Project

Inherits:
Object
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/pivotal_sync/project.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



7
8
9
# File 'lib/pivotal_sync/project.rb', line 7

def all
  parse(Client.connection["projects"].get)
end

.find(id) ⇒ Object



11
12
13
# File 'lib/pivotal_sync/project.rb', line 11

def find(id)
  parse(Client.connection["projects/#{id}"].get)
end

Instance Method Details

#iterationsObject



42
43
44
# File 'lib/pivotal_sync/project.rb', line 42

def iterations
  Iteration.all(id)
end

#storiesObject



46
47
48
# File 'lib/pivotal_sync/project.rb', line 46

def stories
  iterations.map { |i| i.stories }.flatten
end