Sha256: 4c74de08e2a52753eae54d8a100cc2d12974dac558dbe68a71e5a54bfde389aa

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

module Aptible
  module Resource
    class Adapter < HyperResource::Adapter::HAL_JSON
      class << self
        def get_data_type_from_object(object)
          return nil unless object

          return nil unless (type = object['_type'])

          if type.respond_to?(:camelize)
            type.camelize
          else
            type[0].upcase + type[1..-1]
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aptible-resource-1.1.2 lib/aptible/resource/adapter.rb
aptible-resource-1.1.1 lib/aptible/resource/adapter.rb