Sha256: 9356ac4d7562e0fb81df82cd5cefe212004edb1e21b451b34ba3fa8734b9e5a3

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

module Ridley
  # @author Jamie Winsor <reset@riotgames.com>
  class EnvironmentResource < Ridley::Resource
    set_resource_path "environments"
    represented_by Ridley::EnvironmentObject

    # Delete all of the environments on the client. The '_default' environment
    # will never be deleted.
    #
    # @return [Array<Ridley::EnvironmentObject>]
    def delete_all
      envs = all.reject { |env| env.name.to_s == '_default' }
      envs.collect do |resource|
        future(:delete, resource)
      end.map(&:value)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ridley-0.11.2 lib/ridley/resources/environment_resource.rb
ridley-0.11.1 lib/ridley/resources/environment_resource.rb
ridley-0.11.0.rc1 lib/ridley/resources/environment_resource.rb