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.27 lib/fog/container_infra/openstack/models/base.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-openstack-0.1.26/lib/fog/container_infra/openstack/models/base.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-openstack-0.1.26/lib/fog/container_infra/openstack/models/base.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-openstack-0.1.26/lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.26 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.25 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.24 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.23 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.22 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.21 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.20 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.19 lib/fog/container_infra/openstack/models/base.rb
fog-openstack-0.1.18 lib/fog/container_infra/openstack/models/base.rb