Class: Pickler::Tracker::Project
- Defined in:
- lib/pickler/tracker/project.rb
Instance Attribute Summary collapse
-
#tracker ⇒ Object
readonly
Returns the value of attribute tracker.
Instance Method Summary collapse
- #deliver_all_finished_stories ⇒ Object
-
#initialize(tracker, attributes = {}) ⇒ Project
constructor
A new instance of Project.
- #new_story(attributes = {}, &block) ⇒ Object
- #stories(*args) ⇒ Object
- #story(story_id) ⇒ Object
Methods inherited from Abstract
accessor, date_reader, #id, reader, #to_xml
Constructor Details
#initialize(tracker, attributes = {}) ⇒ Project
Returns a new instance of Project.
8 9 10 11 |
# File 'lib/pickler/tracker/project.rb', line 8 def initialize(tracker, attributes = {}) @tracker = tracker super(attributes) end |
Instance Attribute Details
#tracker ⇒ Object (readonly)
Returns the value of attribute tracker.
5 6 7 |
# File 'lib/pickler/tracker/project.rb', line 5 def tracker @tracker end |
Instance Method Details
#deliver_all_finished_stories ⇒ Object
30 31 32 |
# File 'lib/pickler/tracker/project.rb', line 30 def deliver_all_finished_stories request_xml(:put,"/projects/#{id}/stories_deliver_all_finished") end |
#new_story(attributes = {}, &block) ⇒ Object
26 27 28 |
# File 'lib/pickler/tracker/project.rb', line 26 def new_story(attributes = {}, &block) Story.new(self, attributes, &block) end |
#stories(*args) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/pickler/tracker/project.rb', line 18 def stories(*args) filter = encode_term(args) if args.any? path = "/projects/#{id}/stories" path << "?filter=#{CGI.escape(filter)}" if filter response = tracker.get_xml(path) [response["stories"]].flatten.compact.map {|s| Story.new(self,s)} end |