Class: Felt::InputGroup::Wrapper
- Defined in:
- lib/input_group/wrapper.rb
Overview
Encapsulates the common functionality of all input groups.
Renders a wrapping div containing a label, a hint, an input field, a help element, and a list of errors.
Pass the input field as a block to the constructor.
Instance Attribute Summary collapse
-
#config_key ⇒ Object
readonly
Returns the value of attribute config_key.
Attributes inherited from Base
#attribute, #form, #input_options, #options
Instance Method Summary collapse
-
#initialize(config_key: nil, **args) ⇒ Wrapper
constructor
A new instance of Wrapper.
Methods inherited from Base
#classes, #error_classes, #errors, #errors?, #help, #help?, #help_classes, #hint, #hint?, #hint_classes, #input_classes, #label, #label?, #label_classes, #placeholder, #placeholder?
Constructor Details
#initialize(config_key: nil, **args) ⇒ Wrapper
Returns a new instance of Wrapper.
16 17 18 19 |
# File 'lib/input_group/wrapper.rb', line 16 def initialize(config_key: nil, **args) @config_key = config_key super(**args) end |
Instance Attribute Details
#config_key ⇒ Object (readonly)
Returns the value of attribute config_key.
14 15 16 |
# File 'lib/input_group/wrapper.rb', line 14 def config_key @config_key end |