| Class | JIRA::HasManyProxy |
| In: |
lib/jira/has_many_proxy.rb
|
| Parent: | Object |
Whenever a collection from a has_many relationship is accessed, an instance of this class is returned. This instance wraps the Array of instances in the collection with an extra build method, which allows new instances to be built on the collection with the correct properties.
In practice, instances of this class behave exactly like an Array.
| collection | [RW] | |
| parent | [R] | |
| target_class | [R] |
Forces an HTTP request to fetch all instances of the target class that are associated with the parent
Builds an instance of this class with the correct parent. For example, issue.comments.build(attrs) will initialize a comment as follows:
JIRA::Resource::Comment.new(issue.client,
:attrs => attrs,
:issue => issue)