Sha256: ee3c0f3968636276f666c367456fe841013d6b4d643b0efa11b0da7c0527510f

Contents?: true

Size: 418 Bytes

Versions: 15

Compression:

Stored size: 418 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

15 entries across 15 versions & 1 rubygems

Version Path
aptible-resource-1.1.0 lib/aptible/resource/adapter.rb
aptible-resource-1.1.0.pre.0 lib/aptible/resource/adapter.rb
aptible-resource-1.0.2 lib/aptible/resource/adapter.rb
aptible-resource-1.0.1 lib/aptible/resource/adapter.rb
aptible-resource-1.0.0 lib/aptible/resource/adapter.rb
aptible-resource-0.5.0 lib/aptible/resource/adapter.rb
aptible-resource-0.4.0 lib/aptible/resource/adapter.rb
aptible-resource-0.3.8 lib/aptible/resource/adapter.rb
aptible-resource-0.3.7 lib/aptible/resource/adapter.rb
aptible-resource-0.3.6 lib/aptible/resource/adapter.rb
aptible-resource-0.3.5 lib/aptible/resource/adapter.rb
aptible-resource-0.3.4 lib/aptible/resource/adapter.rb
aptible-resource-0.3.3 lib/aptible/resource/adapter.rb
aptible-resource-0.3.2 lib/aptible/resource/adapter.rb
aptible-resource-0.3.1 lib/aptible/resource/adapter.rb