Class: Alchemy::Admin::Resource::CheckboxFilter

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/alchemy/admin/resource/checkbox_filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, label:, params:) ⇒ CheckboxFilter

Returns a new instance of CheckboxFilter.



18
19
20
21
22
# File 'app/components/alchemy/admin/resource/checkbox_filter.rb', line 18

def initialize(name:, label:, params:)
  @name = name
  @label = label
  @checked = get_checked_from(params)
end

Instance Attribute Details

#checkedObject (readonly)

Returns the value of attribute checked.



7
8
9
# File 'app/components/alchemy/admin/resource/checkbox_filter.rb', line 7

def checked
  @checked
end

#labelObject (readonly)

Returns the value of attribute label.



7
8
9
# File 'app/components/alchemy/admin/resource/checkbox_filter.rb', line 7

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'app/components/alchemy/admin/resource/checkbox_filter.rb', line 7

def name
  @name
end

#search_formObject (readonly)

Returns the value of attribute search_form.



7
8
9
# File 'app/components/alchemy/admin/resource/checkbox_filter.rb', line 7

def search_form
  @search_form
end