Class: Lookbook::PriorityTag
- Defined in:
- lib/lookbook/tags/priority_tag.rb
Constant Summary collapse
- DEFAULT_PRIORITY =
100000
Instance Method Summary collapse
- #value ⇒ Object (also: #to_i)
Methods inherited from YardTag
#initialize, #options, supports_options, supports_options?, #text, #to_s
Constructor Details
This class inherits a constructor from Lookbook::YardTag
Instance Method Details
#value ⇒ Object Also known as: to_i
5 6 7 8 9 10 11 12 |
# File 'lib/lookbook/tags/priority_tag.rb', line 5 def value if text.present? int = text.to_i (int == 0) ? DEFAULT_PRIORITY : int else DEFAULT_PRIORITY end end |