Class: Brainzlab::Components::Input
- Defined in:
- lib/brainzlab/components/input.rb
Instance Method Summary collapse
-
#initialize(type: 'text', error: false, **attrs) ⇒ Input
constructor
A new instance of Input.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(type: 'text', error: false, **attrs) ⇒ Input
Returns a new instance of Input.
6 7 8 9 10 |
# File 'lib/brainzlab/components/input.rb', line 6 def initialize(type: 'text', error: false, **attrs) @type = type @error = error @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/brainzlab/components/input.rb', line 12 def view_template input( type: @type, class: input_classes, **@attrs ) end |