Class: Lighthouse::Tag
- Inherits:
-
String
- Object
- String
- Lighthouse::Tag
- Defined in:
- lib/lighthouse/tag.rb
Instance Attribute Summary collapse
-
#project_id ⇒ Object
Returns the value of attribute project_id.
Instance Method Summary collapse
- #fix_chars! ⇒ Object
-
#initialize(s, project_id) ⇒ Tag
constructor
A new instance of Tag.
- #tickets(options = {}) ⇒ Object
Constructor Details
#initialize(s, project_id) ⇒ Tag
Returns a new instance of Tag.
8 9 10 11 |
# File 'lib/lighthouse/tag.rb', line 8 def initialize(s, project_id) self.project_id = project_id super(s) end |
Instance Attribute Details
#project_id ⇒ Object
Returns the value of attribute project_id.
6 7 8 |
# File 'lib/lighthouse/tag.rb', line 6 def project_id @project_id end |
Instance Method Details
#fix_chars! ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/lighthouse/tag.rb', line 18 def fix_chars! downcase! gsub! /(^')|('$)/, '' gsub! /[^a-z0-9 \-_@\!']/, '' gsub! /^[^a-z0-9!#.:@_]*[^a-z0-9!#.:@_'-]/, '' strip! end |
#tickets(options = {}) ⇒ Object
13 14 15 16 |
# File 'lib/lighthouse/tag.rb', line 13 def tickets( = {}) [:project_id] ||= project_id Ticket.find(:all, :params => .merge().update(:q => %{tagged:"#{self}"})) end |