Class: Spark::Checklist::Item
- Inherits:
-
Spark::Component::Base
- Object
- ActionView::Component::Base
- Spark::Component::Base
- Spark::Checklist::Item
- Defined in:
- app/components/spark/checklist/item.rb
Instance Method Summary collapse
- #complete_class ⇒ Object
-
#initialize ⇒ Item
constructor
A new instance of Item.
Methods inherited from Spark::Component::Base
Constructor Details
#initialize ⇒ Item
Returns a new instance of Item.
11 12 13 14 15 16 |
# File 'app/components/spark/checklist/item.rb', line 11 def initialize(*) super classname.base = 'spark-checklist-item' tag_attrs.add(rel: 'noopener noreferrer') if @target == "_blank" end |
Instance Method Details
#complete_class ⇒ Object
18 19 20 |
# File 'app/components/spark/checklist/item.rb', line 18 def complete_class 'complete' if @completed end |