Class: Dill::Field
Overview
A form field.
Class Method Summary collapse
Instance Method Summary collapse
-
#get ⇒ Object
Override this to get the actual value.
-
#set(value) ⇒ Object
Sets the field value.
Methods inherited from Widget
#absent?, action, #click, #diff, #gone?, #has_action?, #initialize, #inspect, #present?, root, #root, selector, #text, #to_cell, #to_s, #value, widget, widget_delegator
Methods included from WidgetParts::Container
#has_no_widget?, #has_widget?, #widget
Methods included from WidgetParts::Struct
Constructor Details
This class inherits a constructor from Dill::Widget
Class Method Details
.find_in(parent) ⇒ Object
4 5 6 |
# File 'lib/dill/widgets/field.rb', line 4 def self.find_in(parent) new { parent.root.find_field(*selector) } end |
.present_in?(parent) ⇒ Boolean
8 9 10 |
# File 'lib/dill/widgets/field.rb', line 8 def self.present_in?(parent) parent.root.has_field?(*selector) end |
Instance Method Details
#get ⇒ Object
Override this to get the actual value.
15 16 17 |
# File 'lib/dill/widgets/field.rb', line 15 def get raise NotImplementedError end |
#set(value) ⇒ Object
Sets the field value.
Override this to set the value.
22 23 24 |
# File 'lib/dill/widgets/field.rb', line 22 def set(value) raise NotImplementedError end |