Sha256: 7ee96331cf158a76e20a57226be2d2e6db6987e1a39e9ba385058580cbaa7f8b

Contents?: true

Size: 506 Bytes

Versions: 15

Compression:

Stored size: 506 Bytes

Contents

module Fog
  module Compute
    class Google
      class UrlMaps < Fog::Collection
        model Fog::Compute::Google::UrlMap

        def all
          data = service.list_url_maps.to_h[:items] || []
          load(data)
        end

        def get(identity)
          if url_map = service.get_url_map(identity).to_h
            new(url_map)
          end
        rescue ::Google::Apis::ClientError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-google-1.7.1 lib/fog/compute/google/models/url_maps.rb
fog-google-1.7.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.6.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.5.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.4.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.3.3 lib/fog/compute/google/models/url_maps.rb
fog-google-1.3.2 lib/fog/compute/google/models/url_maps.rb
fog-google-1.3.1 lib/fog/compute/google/models/url_maps.rb
fog-google-1.3.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.2.2 lib/fog/compute/google/models/url_maps.rb
fog-google-1.2.1 lib/fog/compute/google/models/url_maps.rb
fog-google-1.2.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.1.0 lib/fog/compute/google/models/url_maps.rb
fog-google-1.0.1 lib/fog/compute/google/models/url_maps.rb
fog-google-1.0.0 lib/fog/compute/google/models/url_maps.rb