Class: PhlexKit::MaskedInput
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::MaskedInput
- Defined in:
- app/components/phlex_kit/masked_input/masked_input.rb
Overview
Text input with an inline mask. Ported from ruby_ui's RubyUI::MaskedInput —
ruby_ui uses the maska JS lib; PhlexKit ships a small dependency-free mask
controller (#=digit, A=letter, *=any) driven by a data-mask attribute. Swap in
maska by replacing masked_input_controller.js if you need its full feature set.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ MaskedInput
constructor
A new instance of MaskedInput.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ MaskedInput
Returns a new instance of MaskedInput.
7 |
# File 'app/components/phlex_kit/masked_input/masked_input.rb', line 7 def initialize(**attrs) = (@attrs = attrs) |