Class: Alchemy::Admin::Resource::DatepickerFilter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, label:, input_type: :datetime, params: {}) ⇒ DatepickerFilter

Returns a new instance of DatepickerFilter.



22
23
24
25
26
27
28
# File 'app/components/alchemy/admin/resource/datepicker_filter.rb', line 22

def initialize(name:, label:, input_type: :datetime, params: {})
  @name = name
  @label = label
  @input_type = input_type
  @params = params
  @value = get_value(params)
end

Instance Attribute Details

#input_typeObject (readonly)

Returns the value of attribute input_type.



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

def input_type
  @input_type
end

#labelObject (readonly)

Returns the value of attribute label.



7
8
9
# File 'app/components/alchemy/admin/resource/datepicker_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/datepicker_filter.rb', line 7

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end