Sha256: c590b4141d1f75f171e149909a9f5d6d9a868075cffa3abed8685a8dec3fb73d

Contents?: true

Size: 728 Bytes

Versions: 18

Compression:

Stored size: 728 Bytes

Contents

# frozen_string_literal: true

desc "Remove a nickname"
command :remove do |remove|
  remove.desc "Removes a nickname from a friend"
  remove.arg_name "NAME NICKNAME"
  remove.command :nickname do |remove_nickname|
    remove_nickname.action do |_, _, args|
      @introvert.remove_nickname(name: args.first, nickname: args[1])
      @dirty = true # Mark the file for cleaning.
    end
  end

  remove.desc "Removes a tag from a friend"
  remove.arg_name "NAME @TAG"
  remove.command :tag do |remove_tag|
    remove_tag.action do |_, _, args|
      @introvert.remove_tag(
        name: args[0..-2].join(" "),
        tag: Tag.convert_to_tag(args.last)
      )
      @dirty = true # Mark the file for cleaning.
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
friends-0.53 lib/friends/commands/remove.rb
friends-0.52 lib/friends/commands/remove.rb
friends-0.51 lib/friends/commands/remove.rb
friends-0.50 lib/friends/commands/remove.rb
friends-0.49 lib/friends/commands/remove.rb
friends-0.48 lib/friends/commands/remove.rb
friends-0.47 lib/friends/commands/remove.rb
friends-0.46 lib/friends/commands/remove.rb
friends-0.45 lib/friends/commands/remove.rb
friends-0.44 lib/friends/commands/remove.rb
friends-0.43 lib/friends/commands/remove.rb
friends-0.42 lib/friends/commands/remove.rb
friends-0.41 lib/friends/commands/remove.rb
friends-0.40 lib/friends/commands/remove.rb
friends-0.39 lib/friends/commands/remove.rb
friends-0.38 lib/friends/commands/remove.rb
friends-0.37 lib/friends/commands/remove.rb
friends-0.36 lib/friends/commands/remove.rb