Sha256: 70d08bb685c33cf9f170f3ab182e9e632ea29862c2fb8e92ae0c303154568c1f

Contents?: true

Size: 329 Bytes

Versions: 8

Compression:

Stored size: 329 Bytes

Contents

module ActiveModel
  module Serializable
    module Utils
      extend self

      def _const_get(const)
        begin
          method = RUBY_VERSION >= '2.0' ? :const_get : :qualified_const_get
          Object.send method, const
        rescue NameError
          const.safe_constantize
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active_model_serializers-0.9.9 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.8 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.7 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.6 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.5 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.4 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.3 lib/active_model/serializable/utils.rb
active_model_serializers-0.9.1 lib/active_model/serializable/utils.rb