Class: Mongomatic::TypeConverters::Float
- Inherits:
-
Base
- Object
- Base
- Mongomatic::TypeConverters::Float
show all
- Defined in:
- lib/mongomatic/type_converters.rb
Instance Method Summary
collapse
Methods inherited from Base
#cast, #initialize
Instance Method Details
#convert_orig_val ⇒ Object
46
47
48
|
# File 'lib/mongomatic/type_converters.rb', line 46
def convert_orig_val
@orig_val.respond_to?(:to_f) ? @orig_val.to_f : nil
end
|
#type_match? ⇒ Boolean
42
43
44
|
# File 'lib/mongomatic/type_converters.rb', line 42
def type_match?
@orig_val.kind_of? ::Float
end
|