Class: Mongomatic::TypeConverters::Hash
- Inherits:
-
Base
- Object
- Base
- Mongomatic::TypeConverters::Hash
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
76
77
78
79
80
81
|
# File 'lib/mongomatic/type_converters.rb', line 76
def convert_orig_val
[:to_h, :to_hash].each do |meth|
res = (@orig_val.respond_to?(meth) ? @orig_val.send(meth) : nil)
return res if !res.nil?
end; nil
end
|
#type_match? ⇒ Boolean
72
73
74
|
# File 'lib/mongomatic/type_converters.rb', line 72
def type_match?
@orig_val.kind_of? ::Hash
end
|