Class: Sandals::TextArea
- Inherits:
-
Object
- Object
- Sandals::TextArea
- Includes:
- Actionable, FieldValidation
- Defined in:
- lib/sandals/view.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes included from FieldValidation
Instance Method Summary collapse
- #change(value) ⇒ Object
-
#initialize(id, label, value:, action:, error: nil) ⇒ TextArea
constructor
A new instance of TextArea.
Methods included from FieldValidation
Constructor Details
#initialize(id, label, value:, action:, error: nil) ⇒ TextArea
Returns a new instance of TextArea.
391 392 393 394 395 396 397 |
# File 'lib/sandals/view.rb', line 391 def initialize(id, label, value:, action:, error: nil) @id = id @label = label.to_s @value = value.to_s initialize_error(error) @action = action end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
389 390 391 |
# File 'lib/sandals/view.rb', line 389 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
389 390 391 |
# File 'lib/sandals/view.rb', line 389 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
389 390 391 |
# File 'lib/sandals/view.rb', line 389 def value @value end |
Instance Method Details
#change(value) ⇒ Object
399 400 401 |
# File 'lib/sandals/view.rb', line 399 def change(value) execute_action(value) end |