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.



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

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

Instance Attribute Details

#prefix_optionsObject



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

def prefix_options
  @prefix_options || {}
end

#project_idObject

Returns the value of attribute project_id.



341
342
343
# File 'lib/lighthouse.rb', line 341

def project_id
  @project_id
end

Instance Method Details

#tickets(options = {}) ⇒ Object



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

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