Class: Primer::Forms::Group
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Primer::Forms::Group
- Defined in:
- lib/primer/forms/group.rb
Overview
:nodoc:
Constant Summary collapse
- VERTICAL =
:vertical
- HORIZONTAL =
:horizontal
- DEFAULT_LAYOUT =
VERTICAL
- LAYOUTS =
[VERTICAL, HORIZONTAL].freeze
Instance Attribute Summary
Attributes included from ActsAsComponent
Instance Method Summary collapse
- #horizontal? ⇒ Boolean
-
#initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments) ⇒ Group
constructor
A new instance of Group.
Methods inherited from BaseComponent
#content, inherited, #input?, #perform_render, #render?, #to_component, #type
Methods included from ActsAsComponent
#compile!, extended, #renders_templates
Methods included from ClassNameHelper
Constructor Details
#initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments) ⇒ Group
Returns a new instance of Group.
14 15 16 17 18 19 20 |
# File 'lib/primer/forms/group.rb', line 14 def initialize(inputs:, builder:, form:, layout: DEFAULT_LAYOUT, **system_arguments) @inputs = inputs @builder = builder @form = form @layout = layout @system_arguments = system_arguments end |
Instance Method Details
#horizontal? ⇒ Boolean
22 23 24 |
# File 'lib/primer/forms/group.rb', line 22 def horizontal? @layout == HORIZONTAL end |