Class: Ayadn::Blacklist

Inherits:
Thor
  • Object
show all
Defined in:
lib/ayadn/blacklist.rb

Instance Method Summary collapse

Instance Method Details

#add(*args) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/ayadn/blacklist.rb', line 8

def add(*args)
  if args.length < 2
    Status.new.type_and_target_missing
    exit
  end
  BlacklistWorkers.new.add(args)
  Status.new.done
end

#clearObject



38
39
40
41
# File 'lib/ayadn/blacklist.rb', line 38

def clear
  BlacklistWorkers.new.clear
  Status.new.done
end

#listObject



33
34
35
# File 'lib/ayadn/blacklist.rb', line 33

def list
  BlacklistWorkers.new.list(options)
end

#remove(*args) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/ayadn/blacklist.rb', line 20

def remove(*args)
  if args.length < 2
    Status.new.type_and_target_missing
    exit
  end
  BlacklistWorkers.new.remove(args)
  Status.new.done
end