Class: NitroKit::Textarea
- Defined in:
- app/components/nitro_kit/textarea.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from Component
Instance Method Summary collapse
-
#initialize(value: nil, **attrs) ⇒ Textarea
constructor
A new instance of Textarea.
- #view_template ⇒ Object
Methods inherited from Component
Constructor Details
#initialize(value: nil, **attrs) ⇒ Textarea
Returns a new instance of Textarea.
5 6 7 8 9 10 11 12 |
# File 'app/components/nitro_kit/textarea.rb', line 5 def initialize(value: nil, **attrs) @value = value super( attrs, class: default_class ) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
14 15 16 |
# File 'app/components/nitro_kit/textarea.rb', line 14 def value @value end |
Instance Method Details
#view_template ⇒ Object
16 17 18 |
# File 'app/components/nitro_kit/textarea.rb', line 16 def view_template textarea(**attrs) { plain(value) } end |