Class: DataMapper::Query::Conditions::RegexpComparison

Inherits:
AbstractComparison show all
Defined in:
lib/dm-core/query/conditions/comparison.rb

Overview

Tests whether the value in the record matches the expected regexp set for the Comparison.

Instance Attribute Summary

Attributes inherited from AbstractComparison

#loaded_value, #parent, #subject

Instance Method Summary collapse

Methods inherited from AbstractComparison

descendants, inherited, #inspect, #matches?, #negated?, #property?, #relationship?, slug, #slug, #to_s, #value

Methods included from Deprecate

#deprecate

Methods included from Equalizer

#equalize

Instance Method Details

#valid?Boolean

Checks that the Comparison is valid

Returns:

  • (Boolean)

See Also:



731
732
733
# File 'lib/dm-core/query/conditions/comparison.rb', line 731

def valid?
  loaded_value.kind_of?(Regexp)
end