instance method detect_type

Ruby on Rails 2.3.18

Since v2.3.18 Last seen in v2.3.18

Signature

detect_type(object, options)

No documentation comment.

Parameters

object req
options req
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

Type at least 2 characters to search.

↑↓ navigate · open · esc close