Class: Lighthouse::Tag

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s, project_id) ⇒ Tag

Returns a new instance of Tag.



347
348
349
350
# File 'lib/lighthouse.rb', line 347

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

Instance Attribute Details

#prefix_optionsObject



352
353
354
# File 'lib/lighthouse.rb', line 352

def prefix_options
  @prefix_options || {}
end

#project_idObject

Returns the value of attribute project_id.



345
346
347
# File 'lib/lighthouse.rb', line 345

def project_id
  @project_id
end

Instance Method Details

#tickets(options = {}) ⇒ Object



356
357
358
359
# File 'lib/lighthouse.rb', line 356

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