Class: Peaty::Iteration
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#attributes, #connection, #error
Class Method Summary collapse
- .collection_path(options = {}) ⇒ Object
- .element ⇒ Object
- .member_path(group, options = {}) ⇒ Object
Instance Method Summary collapse
Methods inherited from Base
all, build, #error?, filter_options, find, find_by_id, first, #id, #initialize, #method_missing, #new_record?, parse, #respond_to?, #save, with_connection
Constructor Details
This class inherits a constructor from Peaty::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Peaty::Base
Class Method Details
.collection_path(options = {}) ⇒ Object
15 16 17 |
# File 'lib/peaty/iteration.rb', line 15 def collection_path( = {}) "/projects/%i/iterations" % [:project_id].to_i end |
.element ⇒ Object
12 13 14 |
# File 'lib/peaty/iteration.rb', line 12 def element "iteration" end |
.member_path(group, options = {}) ⇒ Object
18 19 20 |
# File 'lib/peaty/iteration.rb', line 18 def member_path(group, = {}) "/projects/%i/iterations/%s" % [[:project_id].to_i, group] end |
Instance Method Details
#stories(options = {}) ⇒ Object
5 6 7 8 9 |
# File 'lib/peaty/iteration.rb', line 5 def stories( = {}) Array.wrap(self.attributes["stories"]).map do |story| Story.with_connection(self.connection).new(story) end end |