Class: Flux::PT::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/flux/pivotal_tracker.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Project

Returns a new instance of Project.



14
15
16
# File 'lib/flux/pivotal_tracker.rb', line 14

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/flux/pivotal_tracker.rb', line 8

def id
  @id
end

Class Method Details

.currentObject



10
11
12
# File 'lib/flux/pivotal_tracker.rb', line 10

def self.current
  Project.new(PT.config['project_id'])
end

Instance Method Details

#membersObject



18
19
20
21
22
23
24
25
26
# File 'lib/flux/pivotal_tracker.rb', line 18

def members
  ::PivotalTracker::Membership.all(self).tap { |members|
    class << members
      def me
        find { |m| m.email == PT.config['email'] }
      end
    end
  }
end

#storiesObject



28
29
30
# File 'lib/flux/pivotal_tracker.rb', line 28

def stories
  Story::Finders.new(self)
end