Class: JIRA::Resource::Project
- Defined in:
- lib/jira/resource/project.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs, #client, #deleted, #expanded
Class Method Summary collapse
Instance Method Summary collapse
-
#issues ⇒ Object
Returns all the issues for this project.
Methods inherited from Base
all, belongs_to, belongs_to_relationships, build, collection_attributes_are_nested, collection_path, #collection_path, #delete, endpoint_name, #fetch, find, #has_errors?, has_many, has_one, #id, #initialize, #key_value, #method_missing, nested_collections, #new_record?, parse_json, #path_component, #respond_to?, #save, #save!, #set_attrs, #set_attrs_from_response, singular_path, #to_json, #to_s, #to_sym, #url
Constructor Details
This class inherits a constructor from JIRA::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class JIRA::Base
Class Method Details
.key_attribute ⇒ Object
14 15 16 |
# File 'lib/jira/resource/project.rb', line 14 def self.key_attribute :key end |
Instance Method Details
#issues ⇒ Object
Returns all the issues for this project
19 20 21 22 23 24 25 |
# File 'lib/jira/resource/project.rb', line 19 def issues response = client.get(client.[:rest_base_path] + "/search?jql=project%3D'#{key}'") json = self.class.parse_json(response.body) json['issues'].map do |issue| client.Issue.build(issue) end end |