Class: Lighthouse::Ticket
- Defined in:
- lib/lighthouse.rb
Overview
Find tickets
Lighthouse::Ticket.find(:all, :params => { :project_id => 44 })
Lighthouse::Ticket.find(:all, :params => { :project_id => 44, :q => "state:closed tagged:committed" })
project = Lighthouse::Project.find(44)
project.tickets
project.tickets(:q => "state:closed tagged:committed")
Creating a Ticket
ticket = Lighthouse::Ticket.new(:project_id => 44)
ticket.title = 'asdf'
...
ticket. << 'ruby' << 'rails' << '@high'
ticket.save
Updating a Ticket
ticket = Lighthouse::Ticket.find(20, :params => { :project_id => 44 })
ticket.state = 'resolved'
ticket..delete '@high'
ticket.save
Instance Attribute Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Instance Attribute Details
#tags ⇒ Object
192 193 194 195 |
# File 'lib/lighthouse.rb', line 192 def attributes['tag'] ||= nil @tags ||= tag.blank? ? [] : parse_with_spaces(tag) end |
Instance Method Details
#id ⇒ Object
187 188 189 190 |
# File 'lib/lighthouse.rb', line 187 def id attributes['number'] ||= nil number end |
#save_with_tags ⇒ Object
197 198 199 200 201 202 |
# File 'lib/lighthouse.rb', line 197 def self.tag = @tags.collect do |tag| tag.include?(' ') ? tag.inspect : tag end.join(" ") if @tags.is_a?(Array) @tags = nil ; end |