Sha256: 3756f1489d12236a5fe4a329cf939e63e2f01bfc30e17e9061574deff15cf231

Contents?: true

Size: 423 Bytes

Versions: 8

Compression:

Stored size: 423 Bytes

Contents

require 'warp/dir/command'
class Warp::Dir::Command
  class Remove < ::Warp::Dir::Command
    description %q(Removes a given warp point from the database)
    needs_a_point? true
    aliases :rm, :delete

    def run(*args)
      point_name = self.point_name
      store.remove point_name: point_name
      on :success do
        message "Warp point #{point_name.to_s.yellow} has been removed."
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
warp-dir-1.7.0 lib/warp/dir/command/remove.rb
warp-dir-1.6.2 lib/warp/dir/command/remove.rb
warp-dir-1.6.1 lib/warp/dir/command/remove.rb
warp-dir-1.6.0 lib/warp/dir/command/remove.rb
warp-dir-1.5.0 lib/warp/dir/command/remove.rb
warp-dir-1.3.0 lib/warp/dir/command/remove.rb
warp-dir-1.2.0 lib/warp/dir/command/remove.rb
warp-dir-1.1.5 lib/warp/dir/command/remove.rb