Sha256: bf33e8b9aaecd3eca9739306c268051c2d54fa8a762e1be853f7b5ee9189f276

Contents?: true

Size: 813 Bytes

Versions: 1

Compression:

Stored size: 813 Bytes

Contents

require 'fog/core/collection'
require 'fog/azurerm/models/application_gateway/gateway'

module Fog
  module ApplicationGateway
    class AzureRM
      # Application Gateway collection class for Application Gateway Service
      class Gateways < Fog::Collection
        model Fog::ApplicationGateway::AzureRM::Gateway
        attribute :resource_group

        def all
          requires :resource_group
          application_gateways = []
          service.list_application_gateways(resource_group).each do |gateway|
            application_gateways << Fog::ApplicationGateway::AzureRM::Gateway.parse(gateway)
          end
          load(application_gateways)
        end

        def get(identity)
          all.find { |f| f.name == identity }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-azure-rm-0.0.5 lib/fog/azurerm/models/application_gateway/gateways.rb