Class: Looks::Command::Unset

Inherits:
AccountManagement show all
Defined in:
lib/looks/command/unset.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from AccountManagement

#configure

Methods inherited from Base

#initialize, #run, #to_s, #usage

Constructor Details

This class inherits a constructor from Looks::Command::Base

Instance Method Details

#argumentsObject



9
10
11
# File 'lib/looks/command/unset.rb', line 9

def arguments
  [ '<address>' ]
end

#execute(args) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/looks/command/unset.rb', line 13

def execute(args)
  super

  address = args.first

   = Gravatar::Account.new(config)

  begin
    .remove_image(address)
  rescue Gravatar::IncorrectMethodParameterError
    raise Error, "#{address}: Unknown email address"
  end
end