class Rly::Commands::Remove
Public Class Methods
new(name, options)
click to toggle source
# File lib/rly/commands/remove.rb, line 9 def initialize(name, options) @name = name @options = options end
Public Instance Methods
execute(input: $stdin, output: $stdout)
click to toggle source
# File lib/rly/commands/remove.rb, line 14 def execute(input: $stdin, output: $stdout) shortcuts = Rly::Shortcuts.new if shortcuts.exist?(@name) shortcuts.destroy(@name) output.puts "removed #{@name} for this directory" else output.puts "can't find shortcut with name #{@name}" end end