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 Equalizer

#equalize

Instance Method Details

#valid?Boolean

Checks that the Comparison is valid

Returns:

  • (Boolean)

See Also:



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

def valid?
  loaded_value.kind_of?(Regexp)
end