Class: Spark::Checklist::Item

Inherits:
Spark::Component::Base show all
Defined in:
app/components/spark/checklist/item.rb

Instance Method Summary collapse

Methods inherited from Spark::Component::Base

#selector, #to_s, #unique_id

Constructor Details

#initializeItem

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_classObject



18
19
20
# File 'app/components/spark/checklist/item.rb', line 18

def complete_class
  'complete' if @completed
end