Sha256: 86e4b05b3b3519c9d3b4dae5e87e4f1c5c63aa325541b278c7b075077b75c8ab

Contents?: true

Size: 593 Bytes

Versions: 11

Compression:

Stored size: 593 Bytes

Contents

require 'fog/core/collection'
require 'fog/google/models/compute/global_forwarding_rule'

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')
          response = service.get_global_forwarding_rule(identity, region)
          return nil if response.nil?
          new(response.body)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
fog-google-0.0.5 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-google-0.0.4 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-google-0.0.3 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-google-0.0.2 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.29.0 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.28.0 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.27.0 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.26.0 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.25.0 lib/fog/google/models/compute/global_forwarding_rules.rb
nsidc-fog-1.24.1 lib/fog/google/models/compute/global_forwarding_rules.rb
fog-1.24.0 lib/fog/google/models/compute/global_forwarding_rules.rb