Class: LIVR::Rules::Modifiers::Default
- Inherits:
-
LIVR::Rule
- Object
- LIVR::Rule
- LIVR::Rules::Modifiers::Default
- Defined in:
- lib/livr/rules/modifiers.rb
Instance Method Summary collapse
- #call(value, user_data, field_results) ⇒ Object
-
#initialize(default_value) ⇒ Default
constructor
A new instance of Default.
Constructor Details
#initialize(default_value) ⇒ Default
Returns a new instance of Default.
5 6 7 |
# File 'lib/livr/rules/modifiers.rb', line 5 def initialize(default_value) @default_value = default_value end |
Instance Method Details
#call(value, user_data, field_results) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/livr/rules/modifiers.rb', line 9 def call(value, user_data, field_results) if is_no_value(value) field_results << @default_value end return end |