instance method
detect_type
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
detect_type(object, options)
No documentation comment.
Parameters
-
objectreq -
optionsreq
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cldr.rb, line 48
def detect_type(object, options)
options.has_key?(:currency) ? :currency : case object
when ::Numeric
:decimal
when ::Date, ::DateTime, ::Time
object.class.name.downcase.to_sym
else
raise_unspecified_format_type!
end
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cldr.rb line 48
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Cldr