Class: Dill::TextField
- Defined in:
- lib/dill/widgets/text_field.rb
Overview
A text field.
Constant Summary
Constants included from Dill
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
- #content? ⇒ Boolean
-
#get ⇒ Object
The text field value.
-
#set(value) ⇒ Object
Sets the text field value.
- #to_cell ⇒ Object
-
#to_s ⇒ Object
The text field value, or the empty string if the field is empty.
Methods inherited from Field
Methods inherited from Widget
action, #class?, #classes, #click, filter, filter?, find_all_in, find_in, #has_action?, #hover, #html, #id, #initialize, not_present_in?, present_in?, root, selector, #text, #value, widget_delegator
Methods included from Widgets::DSL
Methods included from WidgetParts::Container
#has_widget?, #not_visible?, #visible?, #widget, #widgets
Methods included from Dill
Methods included from Constructors
Methods included from WidgetParts::Struct
Constructor Details
This class inherits a constructor from Dill::Widget
Instance Method Details
#content? ⇒ Boolean
23 24 25 |
# File 'lib/dill/widgets/text_field.rb', line 23 def content? get.respond_to?(:empty?) ? ! get.empty? : !! get end |
#get ⇒ Object
Returns The text field value.
6 |
# File 'lib/dill/widgets/text_field.rb', line 6 def_delegator :root, :value, :get |
#set(value) ⇒ Object
Sets the text field value.
12 |
# File 'lib/dill/widgets/text_field.rb', line 12 def_delegator :root, :set |
#to_cell ⇒ Object
19 20 21 |
# File 'lib/dill/widgets/text_field.rb', line 19 def to_cell get end |
#to_s ⇒ Object
Returns the text field value, or the empty string if the field is empty.
17 |
# File 'lib/dill/widgets/text_field.rb', line 17 def_delegator :get, :to_s |