Class: Lighthouse::Tag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from String

#scrape_textmate_links, #scrape_urls, #truncate, #wrap

Constructor Details

#initialize(s, project_id) ⇒ Tag

Returns a new instance of Tag.



363
364
365
366
# File 'lib/fresnel/lighthouse.rb', line 363

def initialize(s, project_id)
  @project_id = project_id
  super(s)
end

Instance Attribute Details

#prefix_optionsObject



368
369
370
# File 'lib/fresnel/lighthouse.rb', line 368

def prefix_options
  @prefix_options || {}
end

#project_idObject

Returns the value of attribute project_id.



361
362
363
# File 'lib/fresnel/lighthouse.rb', line 361

def project_id
  @project_id
end

Instance Method Details

#tickets(options = {}) ⇒ Object



372
373
374
375
# File 'lib/fresnel/lighthouse.rb', line 372

def tickets(options = {})
  options[:project_id] ||= @project_id
  Ticket.find(:all, :params => options.merge(prefix_options).update(:q => %{tagged:"#{self}"}))
end