Class: DataMapper::Property::Regexp
- Inherits:
-
String
- Object
- String
- DataMapper::Property::Regexp
- Defined in:
- lib/dm-types/regexp.rb
Instance Method Summary collapse
Instance Method Details
#dump(value) ⇒ Object
11 12 13 |
# File 'lib/dm-types/regexp.rb', line 11 def dump(value) value.source unless value.nil? end |
#load(value) ⇒ Object
7 8 9 |
# File 'lib/dm-types/regexp.rb', line 7 def load(value) ::Regexp.new(value) unless value.nil? end |
#typecast(value) ⇒ Object
15 16 17 |
# File 'lib/dm-types/regexp.rb', line 15 def typecast(value) load(value) end |