Class: FlexiAdmin::Components::Resource::ButtonSelectComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/flexi_admin/components/resource/button_select_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource, attr_name, options, form:, label: nil, value: nil, disabled: false, **html_options) ⇒ ButtonSelectComponent

Returns a new instance of ButtonSelectComponent.



8
9
10
11
12
13
14
15
16
17
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 8

def initialize(resource, attr_name, options, form:, label: nil, value: nil, disabled: false, **html_options)
  @resource = resource
  @attr_name = attr_name
  @options = options
  @form = form
  @label = label
  @value = value
  @html_options = html_options
  @disabled = disabled
end

Instance Attribute Details

#attr_nameObject (readonly)

Returns the value of attribute attr_name.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def attr_name
  @attr_name
end

#disabledObject (readonly)

Returns the value of attribute disabled.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def disabled
  @disabled
end

#formObject (readonly)

Returns the value of attribute form.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def form
  @form
end

#html_optionsObject (readonly)

Returns the value of attribute html_options.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def html_options
  @html_options
end

#labelObject (readonly)

Returns the value of attribute label.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def label
  @label
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def options
  @options
end

#resourceObject (readonly)

Returns the value of attribute resource.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def resource
  @resource
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6

def value
  @value
end