Class: Unfuzzle::Project
- Inherits:
-
Object
- Object
- Unfuzzle::Project
- Includes:
- Graft
- Defined in:
- lib/unfuzzle/lib/unfuzzle/project.rb
Overview
Project
Represents an Unfuddle project. Has the following attributes:
- id
-
The unique identifier for this project
- slug
-
The “short name” for this project
- name
-
The name of this project
- description
-
The description for the project
- archived
-
The archived status of this project (see Project#archived?)
- created_at
-
The date/time that this project was created
- updated_at
-
The date/time that this project was last updated
Class Method Summary collapse
-
.all ⇒ Object
Return a list of all projects to which the current user has access.
-
.find_by_id(id) ⇒ Object
Find a single project by its ID.
-
.find_by_slug(slug) ⇒ Object
Find a single project by its slug (short name).
Instance Method Summary collapse
-
#archived? ⇒ Boolean
Has this project been archived?.
-
#milestones ⇒ Object
The collection of Milestones associated to this project.
-
#tickets ⇒ Object
The collection of Tickets associated to this project.
Methods included from Graft
Class Method Details
.all ⇒ Object
Return a list of all projects to which the current user has access
29 30 31 32 |
# File 'lib/unfuzzle/lib/unfuzzle/project.rb', line 29 def self.all response = Request.get('/projects') collection_from(response.body, 'projects/project') end |
Instance Method Details
#archived? ⇒ Boolean
Has this project been archived?
47 48 49 |
# File 'lib/unfuzzle/lib/unfuzzle/project.rb', line 47 def archived? archived == true end |
#milestones ⇒ Object
The collection of Milestones associated to this project
52 53 54 |
# File 'lib/unfuzzle/lib/unfuzzle/project.rb', line 52 def milestones Milestone.find_all_by_project_id(id) end |
#tickets ⇒ Object
The collection of Tickets associated to this project
57 58 59 |
# File 'lib/unfuzzle/lib/unfuzzle/project.rb', line 57 def tickets Ticket.find_all_by_project_id(id) end |