diff options
Diffstat (limited to 'activemodel/lib/active_model/type/value.rb')
-rw-r--r-- | activemodel/lib/active_model/type/value.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type/value.rb b/activemodel/lib/active_model/type/value.rb index 5fea0561a6..0d2d6873a8 100644 --- a/activemodel/lib/active_model/type/value.rb +++ b/activemodel/lib/active_model/type/value.rb @@ -84,12 +84,21 @@ module ActiveModel false end + def map(value) # :nodoc: + yield value + end + def ==(other) self.class == other.class && precision == other.precision && scale == other.scale && limit == other.limit end + alias eql? == + + def hash + [self.class, precision, scale, limit].hash + end def assert_valid_value(*) end |