Class: RubyUI::Input

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_ui/input/input.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Constructor Details

#initialize(type: :string, **attrs) ⇒ Input

Returns a new instance of Input.



5
6
7
8
# File 'lib/ruby_ui/input/input.rb', line 5

def initialize(type: :string, **attrs)
  @type = type.to_sym
  super(**attrs)
end

Instance Method Details

#view_templateObject



10
11
12
# File 'lib/ruby_ui/input/input.rb', line 10

def view_template
  input(type: @type, **attrs)
end