Class: DefaultValueForPlugin::BlockValueContainer

Inherits:
Object
  • Object
show all
Defined in:
lib/vex/active_record/plugins/default_value_for/init.rb

Instance Method Summary collapse

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