Sha256: 537ff7949a7bf011824c84179aa28df4cb73487f2fab6b24d942b534385b322a

Contents?: true

Size: 440 Bytes

Versions: 14

Compression:

Stored size: 440 Bytes

Contents

module Fog
  module Compute
    class Google
      class Routes < Fog::Collection
        model Fog::Compute::Google::Route

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

        def get(identity)
          if route = service.get_route(identity).body
            new(route)
          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/routes.rb
fog-google-0.5.5 lib/fog/compute/google/models/routes.rb
fog-google-0.5.4 lib/fog/compute/google/models/routes.rb
fog-google-0.5.3 lib/fog/compute/google/models/routes.rb
fog-google-0.5.2 lib/fog/compute/google/models/routes.rb
fog-google-0.5.1 lib/fog/compute/google/models/routes.rb
fog-google-0.5.0 lib/fog/compute/google/models/routes.rb
fog-google-0.4.2 lib/fog/compute/google/models/routes.rb
fog-google-0.4.1 lib/fog/compute/google/models/routes.rb
fog-google-0.4.0 lib/fog/compute/google/models/routes.rb
fog-google-0.3.2 lib/fog/compute/google/models/routes.rb
fog-google-0.3.1 lib/fog/compute/google/models/routes.rb
fog-google-0.3.0 lib/fog/compute/google/models/routes.rb
fog-google-0.2.0 lib/fog/compute/google/models/routes.rb