Class: Brainzlab::Components::Label
- Defined in:
- lib/brainzlab/components/input.rb
Instance Method Summary collapse
-
#initialize(for_input: nil, **attrs) ⇒ Label
constructor
A new instance of Label.
- #view_template ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(for_input: nil, **attrs) ⇒ Label
Returns a new instance of Label.
32 33 34 35 |
# File 'lib/brainzlab/components/input.rb', line 32 def initialize(for_input: nil, **attrs) @for_input = for_input @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/brainzlab/components/input.rb', line 37 def view_template(&) label( for: @for_input, class: classes('label', @attrs[:class]), **@attrs.except(:class), & ) end |