Sha256: b15fffbd70a9415f0854bc5b11a59cb4d8d3d848860ffe19e921c6cac358cf35

Contents?: true

Size: 521 Bytes

Versions: 33

Compression:

Stored size: 521 Bytes

Contents

require 'fog/openstack/models/model'

module Fog
  module ContainerInfra
    class OpenStack
      class Base < Fog::OpenStack::Model       
        def convert_update_params(params)
          params = params.map do |key, value|
          {
            "path"  => "/#{key}",
            "op"    => value ? "replace" : "remove"
          }.merge(value ? {"value" => value} : {})
          end
          params.each {|k,v| params[k] = v.to_s.capitalize if [true, false].include?(v)} 
        end
      end
    end
  end
end

Version data entries

33 entries across 31 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.10 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.30 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.29 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.9 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.28 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.8 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.7 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.6 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.5 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.4 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.3 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.2 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.3.0 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.2.4 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.2.3 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.2.2 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.2.1 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.2.0 lib/fog/container_infra/openstack/models/base.rb
fog-zj-0.1.28 lib/fog/container_infra/openstack/models/base.rb