Class: Lighthouse::Project

Inherits:
Base
  • Object
show all
Defined in:
lib/lighthouse.rb

Overview

Find projects

Project.find(:all) # find all projects for the current account.
Project.find(44)   # find individual project by ID

Creating a Project

project = Project.new(:name => 'Ninja Whammy Jammy')
project.save
# => true

Updating a Project

project = Project.find(44)
project.name = "Lighthouse Issues"
project.public = false
project.save

Finding tickets

project = Project.find(44)
project.tickets

Instance Method Summary collapse

Methods inherited from Base

inherited

Instance Method Details

#bins(options = {}) ⇒ Object



111
112
113
# File 'lib/lighthouse.rb', line 111

def bins(options = {})
  Bin.find(:all, :params => options.update(:project_id => id))
end

#messages(options = {}) ⇒ Object



103
104
105
# File 'lib/lighthouse.rb', line 103

def messages(options = {})
  Message.find(:all, :params => options.update(:project_id => id))
end

#milestones(options = {}) ⇒ Object



107
108
109
# File 'lib/lighthouse.rb', line 107

def milestones(options = {})
  Milestone.find(:all, :params => options.update(:project_id => id))
end

#tickets(options = {}) ⇒ Object



99
100
101
# File 'lib/lighthouse.rb', line 99

def tickets(options = {})
  Ticket.find(:all, :params => options.update(:project_id => id))
end