Class: Mongomatic::TypeConverters::Regex

Inherits:
Base
  • Object
show all
Defined in:
lib/mongomatic/type_converters.rb

Instance Method Summary collapse

Methods inherited from Base

#cast, #initialize

Constructor Details

This class inherits a constructor from Mongomatic::TypeConverters::Base

Instance Method Details

#convert_orig_valObject



118
119
120
# File 'lib/mongomatic/type_converters.rb', line 118

def convert_orig_val
  ::Regexp.new(@orig_val.to_s)
end

#type_match?Boolean

Returns:

  • (Boolean)


114
115
116
# File 'lib/mongomatic/type_converters.rb', line 114

def type_match?
  @orig_val.kind_of? ::Regexp
end