Class: FlexiAdmin::Components::Resource::ButtonSelectComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- FlexiAdmin::Components::Resource::ButtonSelectComponent
- Defined in:
- lib/flexi_admin/components/resource/button_select_component.rb
Instance Attribute Summary collapse
-
#attr_name ⇒ Object
readonly
Returns the value of attribute attr_name.
-
#disabled ⇒ Object
readonly
Returns the value of attribute disabled.
-
#form ⇒ Object
readonly
Returns the value of attribute form.
-
#html_options ⇒ Object
readonly
Returns the value of attribute html_options.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(resource, attr_name, options, form:, label: nil, value: nil, disabled: false, **html_options) ⇒ ButtonSelectComponent
constructor
A new instance of ButtonSelectComponent.
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, , form:, label: nil, value: nil, disabled: false, **) @resource = resource @attr_name = attr_name @options = @form = form @label = label @value = value @html_options = @disabled = disabled end |
Instance Attribute Details
#attr_name ⇒ Object (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 |
#disabled ⇒ Object (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 |
#form ⇒ Object (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_options ⇒ Object (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 end |
#label ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/flexi_admin/components/resource/button_select_component.rb', line 6 def @options end |
#resource ⇒ Object (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 |
#value ⇒ Object (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 |