Class: PivotalTracker::Project
- Inherits:
-
Object
- Object
- PivotalTracker::Project
- Includes:
- HappyMapper
- Defined in:
- lib/pivotal-tracker/project.rb
Class Method Summary collapse
Instance Method Summary collapse
- #activities ⇒ Object
- #iteration(group) ⇒ Object
- #iterations ⇒ Object
- #memberships ⇒ Object
- #stories ⇒ Object
Class Method Details
.all ⇒ Object
6 7 8 |
# File 'lib/pivotal-tracker/project.rb', line 6 def all @found = parse(Client.connection['/projects'].get) end |
.find(id) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/pivotal-tracker/project.rb', line 10 def find(id) if @found @found.detect { |document| document.id == id } else parse(Client.connection["/projects/#{id}"].get) end end |
Instance Method Details
#activities ⇒ Object
32 33 34 |
# File 'lib/pivotal-tracker/project.rb', line 32 def activities @activities ||= Proxy.new(self, Activity) end |
#iteration(group) ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/pivotal-tracker/project.rb', line 48 def iteration(group) case group.to_sym when :done then Iteration.done(self) when :current then Iteration.current(self) when :backlog then Iteration.backlog(self) else raise ArgumentError, "Invalid group. Use :done, :current or :backlog instead." end end |
#iterations ⇒ Object
36 37 38 |
# File 'lib/pivotal-tracker/project.rb', line 36 def iterations @iterations ||= Proxy.new(self, Iteration) end |
#memberships ⇒ Object
44 45 46 |
# File 'lib/pivotal-tracker/project.rb', line 44 def memberships @memberships ||= Proxy.new(self, Membership) end |