Sha256: bc3cd688da2bdb4ee1b1b7243427315b04d7f087c759ed360e5c81b42d26fb48

Contents?: true

Size: 446 Bytes

Versions: 14

Compression:

Stored size: 446 Bytes

Contents

module Fog
  module Compute
    class Google
      class Regions < Fog::Collection
        model Fog::Compute::Google::Region

        def all
          data = service.list_regions.body
          load(data["items"] || [])
        end

        def get(identity)
          if region = service.get_region(identity).body
            new(region)
          end
        rescue Fog::Errors::NotFound
          nil
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/compute/google/models/regions.rb
fog-google-0.5.5 lib/fog/compute/google/models/regions.rb
fog-google-0.5.4 lib/fog/compute/google/models/regions.rb
fog-google-0.5.3 lib/fog/compute/google/models/regions.rb
fog-google-0.5.2 lib/fog/compute/google/models/regions.rb
fog-google-0.5.1 lib/fog/compute/google/models/regions.rb
fog-google-0.5.0 lib/fog/compute/google/models/regions.rb
fog-google-0.4.2 lib/fog/compute/google/models/regions.rb
fog-google-0.4.1 lib/fog/compute/google/models/regions.rb
fog-google-0.4.0 lib/fog/compute/google/models/regions.rb
fog-google-0.3.2 lib/fog/compute/google/models/regions.rb
fog-google-0.3.1 lib/fog/compute/google/models/regions.rb
fog-google-0.3.0 lib/fog/compute/google/models/regions.rb
fog-google-0.2.0 lib/fog/compute/google/models/regions.rb