Sha256: f6908e949d25e069c9f6b937465d0c40906fe96a584ef30171efe7be9bf1f030

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

module Fog
  module Compute
    class Google
      class GlobalForwardingRules < Fog::Collection
        model Fog::Compute::Google::GlobalForwardingRule

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

        def get(identity, region = "global")
          if global_forwarding_rule = service.get_global_forwarding_rule(identity, region).body
            new(global_forwarding_rule)
          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/global_forwarding_rules.rb
fog-google-0.5.5 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.5.4 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.5.3 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.5.2 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.5.1 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.5.0 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.4.2 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.4.1 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.4.0 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.3.2 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.3.1 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.3.0 lib/fog/compute/google/models/global_forwarding_rules.rb
fog-google-0.2.0 lib/fog/compute/google/models/global_forwarding_rules.rb