Class: Lighthouse::Ticket
- Defined in:
- lib/fresnel/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
- #body ⇒ Object
- #body=(value) ⇒ Object
- #body_html ⇒ Object
- #body_html=(value) ⇒ Object
- #id ⇒ Object
- #save_with_tags ⇒ Object
Methods inherited from Base
Instance Attribute Details
#tags ⇒ Object
257 258 259 260 |
# File 'lib/fresnel/lighthouse.rb', line 257 def attributes['tag'] ||= nil @tags ||= tag.blank? ? [] : parse_with_spaces(tag) end |
Instance Method Details
#body ⇒ Object
262 263 264 |
# File 'lib/fresnel/lighthouse.rb', line 262 def body attributes['body'] ||= '' end |
#body=(value) ⇒ Object
266 267 268 |
# File 'lib/fresnel/lighthouse.rb', line 266 def body=(value) attributes['body'] = value end |
#body_html ⇒ Object
270 271 272 |
# File 'lib/fresnel/lighthouse.rb', line 270 def body_html attributes['body_html'] ||= '' end |
#body_html=(value) ⇒ Object
274 275 276 |
# File 'lib/fresnel/lighthouse.rb', line 274 def body_html=(value) attributes['body_html'] = value end |
#id ⇒ Object
252 253 254 255 |
# File 'lib/fresnel/lighthouse.rb', line 252 def id attributes['number'] ||= nil number end |
#save_with_tags ⇒ Object
278 279 280 281 282 283 |
# File 'lib/fresnel/lighthouse.rb', line 278 def self.tag = @tags.collect do |tag| tag.include?(' ') ? tag.inspect : tag end.join(" ") if @tags.is_a?(Array) @tags = nil ; end |