Sha256: eaa98fc12f77873253f8add66b6b32389c9ea2425977c172b194f4d19b34e721

Contents?: true

Size: 437 Bytes

Versions: 42

Compression:

Stored size: 437 Bytes

Contents

require 'fog/core/collection'
require 'fog/sakuracloud/models/volume/plan'

module Fog
  module Volume
    class SakuraCloud
      class Plans < Fog::Collection
        model Fog::Volume::SakuraCloud::Plan

        def all
          load service.list_plans.body['DiskPlans']
        end

        def get(id)
          all.find { |f| f.id == id }
        rescue Fog::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

42 entries across 40 versions & 5 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/models/volume/plans.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/models/volume/plans.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-sakuracloud-1.7.5/lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.5 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.4 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.3 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.2 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.1 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.7.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.6.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.5.2 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.5.1 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.5.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.4.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.3.3 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.3.2 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.3.1 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.3.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.2.0 lib/fog/sakuracloud/models/volume/plans.rb
fog-sakuracloud-1.1.1 lib/fog/sakuracloud/models/volume/plans.rb