Class: DefaultValueForPlugin::BlockValueContainer
- Defined in:
- lib/vex/active_record/plugins/default_value_for/init.rb
Instance Method Summary collapse
- #evaluate(instance) ⇒ Object
-
#initialize(block) ⇒ BlockValueContainer
constructor
A new instance of BlockValueContainer.
Constructor Details
#initialize(block) ⇒ BlockValueContainer
Returns a new instance of BlockValueContainer.
33 34 35 |
# File 'lib/vex/active_record/plugins/default_value_for/init.rb', line 33 def initialize(block) @block = block end |
Instance Method Details
#evaluate(instance) ⇒ Object
37 38 39 |
# File 'lib/vex/active_record/plugins/default_value_for/init.rb', line 37 def evaluate(instance) return @block.call(instance) end |