Class: FlexiAdmin::Components::Actions::SelectComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- FlexiAdmin::Components::Actions::SelectComponent
- Defined in:
- lib/flexi_admin/components/actions/select_component.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
-
#initialize(context: nil, scope: nil, label: "Akce") ⇒ SelectComponent
constructor
A new instance of SelectComponent.
Constructor Details
#initialize(context: nil, scope: nil, label: "Akce") ⇒ SelectComponent
Returns a new instance of SelectComponent.
9 10 11 12 13 14 15 |
# File 'lib/flexi_admin/components/actions/select_component.rb', line 9 def initialize(context: nil, scope: nil, label: "Akce") @context = context @scope = scope || context&.scope @label = label raise ArgumentError, "context or scope is required" if context.blank? && scope.blank? end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/flexi_admin/components/actions/select_component.rb', line 5 def label @label end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
5 6 7 |
# File 'lib/flexi_admin/components/actions/select_component.rb', line 5 def scope @scope end |