Class: Looks::Command::Unset
- Inherits:
-
AccountManagement
- Object
- Base
- AccountManagement
- Looks::Command::Unset
- Defined in:
- lib/looks/command/unset.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from AccountManagement
Methods inherited from Base
#initialize, #run, #to_s, #usage
Constructor Details
This class inherits a constructor from Looks::Command::Base
Instance Method Details
#arguments ⇒ Object
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 account = Gravatar::Account.new(config) begin account.remove_image(address) rescue Gravatar::IncorrectMethodParameterError raise Error, "#{address}: Unknown email address" end end |