Class: Aequitas::Rule::Format::Proc

Inherits:
Aequitas::Rule::Format show all
Defined in:
lib/aequitas/rule/format/proc.rb

Constant Summary

Constant Summary

Constants inherited from Aequitas::Rule::Format

EMAIL_ADDRESS, FORMATS, FORMAT_MESSAGES, URL

Instance Attribute Summary

Attributes inherited from Aequitas::Rule::Format

#format

Attributes inherited from Aequitas::Rule

#attribute_name, #custom_message, #guard, #skip_condition

Attributes included from ValueObject

#equalizer

Instance Method Summary (collapse)

Methods inherited from Aequitas::Rule::Format

#initialize, rules_for, #valid_value?, #violation_type

Methods inherited from Aequitas::Rule

#attribute_value, #execute?, #initialize, rules_for, #skip?, #validate, #violation_data, #violation_info, #violation_values

Methods included from ValueObject

#equalize_on

Constructor Details

This class inherits a constructor from Aequitas::Rule::Format

Instance Method Details

- (Boolean) expected_format?(value)



10
11
12
# File 'lib/aequitas/rule/format/proc.rb', line 10

def expected_format?(value)
  format.call(value)
end