Class: Dill::FieldGroup::Field
Overview
A form field.
Instance Attribute Summary
Attributes inherited from Widget
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
#!=, #==, action, #has_action?, #initialize, #inspect, #reload, root, selector, #to_f, #to_i, #to_s, widget, widget_delegator
Methods included from WidgetContainer
Constructor Details
This class inherits a constructor from Dill::Widget
Class Method Details
.find_in(parent, options) ⇒ Object
247 248 249 |
# File 'lib/dill/field_group.rb', line 247 def self.find_in(parent, ) new({root: parent.find_field(selector)}.merge()) end |
.present_in?(parent) ⇒ Boolean
251 252 253 |
# File 'lib/dill/field_group.rb', line 251 def self.present_in?(parent) parent.has_field?(selector) end |
Instance Method Details
#get ⇒ Object
Override this to get the actual value.
258 259 260 |
# File 'lib/dill/field_group.rb', line 258 def get raise NotImplementedError end |
#set(value) ⇒ Object
Sets the field value.
Override this to set the value.
265 266 267 |
# File 'lib/dill/field_group.rb', line 265 def set(value) raise NotImplementedError end |