Sha256: 88e1c145208c8929dea32be4f8796d069005b2f26cebe91e9193fa2b5abcc473

Contents?: true

Size: 698 Bytes

Versions: 97

Compression:

Stored size: 698 Bytes

Contents

require "cf/cli/route/base"

module CF::Route
  class Delete < Base
    desc "Delete a route"
    group :routes
    input :route, :desc => "Route to unmap", :argument => true,
      :from_given => find_by_name("route") { client.routes }
    input :really, :type => :boolean, :forget => true, :hidden => true,
      :default => proc { force? || interact }

    def delete_route
      route = input[:route, client.routes]

      return unless input[:really, route]

      with_progress("Deleting route #{c(route.name, :name)}") do
        route.delete!
      end
    end

    private

    def ask_really(route)
      ask("Really delete #{c(route.name, :name)}?", :default => false)
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
cf-5.4.7 lib/cf/cli/route/delete.rb
cf-5.4.7.rc1 lib/cf/cli/route/delete.rb
cf-5.4.5 lib/cf/cli/route/delete.rb
cf-5.4.4 lib/cf/cli/route/delete.rb
trucker-cli-0.0.3 lib/cf/cli/route/delete.rb
cf-5.4.3 lib/cf/cli/route/delete.rb
cf-5.4.2 lib/cf/cli/route/delete.rb
trucker-cli-0.0.2 lib/cf/cli/route/delete.rb
trucker-cli-0.0.1 lib/cf/cli/route/delete.rb
cf-5.4.1 lib/cf/cli/route/delete.rb
cf-5.4.1.rc1 lib/cf/cli/route/delete.rb
cf-5.4.0 lib/cf/cli/route/delete.rb
cf-5.3.1 lib/cf/cli/route/delete.rb
cf-5.3.0 lib/cf/cli/route/delete.rb
cf-5.2.2 lib/cf/cli/route/delete.rb
cf-5.2.1.rc15 lib/cf/cli/route/delete.rb
cf-5.2.1.rc14 lib/cf/cli/route/delete.rb
cf-5.2.1.rc13 lib/cf/cli/route/delete.rb
cf-5.2.1.rc12 lib/cf/cli/route/delete.rb
cf-5.2.1.rc11 lib/cf/cli/route/delete.rb