Class: AdminWidgets::ListWidget::Field
- Inherits:
-
Object
- Object
- AdminWidgets::ListWidget::Field
- Defined in:
- lib/admin_widgets/list_widget.rb
Overview
Helper classes
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#value_callback ⇒ Object
Returns the value of attribute value_callback.
Instance Method Summary collapse
-
#initialize(parent, name, options, value_callback) ⇒ Field
constructor
A new instance of Field.
- #value_for(object) ⇒ Object
Constructor Details
#initialize(parent, name, options, value_callback) ⇒ Field
Returns a new instance of Field.
146 147 148 |
# File 'lib/admin_widgets/list_widget.rb', line 146 def initialize(parent, name, , value_callback) @parent, @name, @options, @value_callback = parent, name, , value_callback end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
144 145 146 |
# File 'lib/admin_widgets/list_widget.rb', line 144 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
144 145 146 |
# File 'lib/admin_widgets/list_widget.rb', line 144 def @options end |
#parent ⇒ Object
Returns the value of attribute parent.
144 145 146 |
# File 'lib/admin_widgets/list_widget.rb', line 144 def parent @parent end |
#value_callback ⇒ Object
Returns the value of attribute value_callback.
144 145 146 |
# File 'lib/admin_widgets/list_widget.rb', line 144 def value_callback @value_callback end |
Instance Method Details
#value_for(object) ⇒ Object
150 151 152 |
# File 'lib/admin_widgets/list_widget.rb', line 150 def value_for(object) object.instance_exec(name, , &value_callback) end |