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-4.1.5.rc2 lib/cf/cli/route/delete.rb
cf-4.1.5.rc1 lib/cf/cli/route/delete.rb
cf-4.1.4 lib/cf/cli/route/delete.rb
cf-4.1.4.rc2 lib/cf/cli/route/delete.rb
cf-4.1.4.rc1 lib/cf/cli/route/delete.rb
cf-4.1.3 lib/cf/cli/route/delete.rb
cf-4.1.2.rc2 lib/cf/cli/route/delete.rb
cf-4.1.2.rc1 lib/cf/cli/route/delete.rb
cf-4.1.1 lib/cf/cli/route/delete.rb
cf-4.1.0rc2 lib/cf/cli/route/delete.rb
cf-4.1.0rc1 lib/cf/cli/route/delete.rb
cf-4.0.1.rc2 lib/cf/cli/route/delete.rb
cf-4.0.1.rc1 lib/cf/cli/route/delete.rb
cf-4.0.0rc2 lib/cf/cli/route/delete.rb
cf-4.0.0rc1 lib/cf/cli/route/delete.rb
cf-3.1.0rc2 lib/cf/cli/route/delete.rb
cf-3.1.0.rc1 lib/cf/cli/route/delete.rb
cf-3.0.1.rc1 lib/cf/cli/route/delete.rb
cf-3.0.0 lib/cf/cli/route/delete.rb
cf-3.0.0rc3 lib/cf/cli/route/delete.rb