Class: Looks::Command::Rm
- Inherits:
-
AccountManagement
- Object
- Base
- AccountManagement
- Looks::Command::Rm
- Defined in:
- lib/looks/command/rm.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
8 9 10 |
# File 'lib/looks/command/rm.rb', line 8 def arguments [ '<id>' ] end |
#execute(args) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/looks/command/rm.rb', line 12 def execute(args) super id = args.first begin Gravatar::Account.new(config).delete_image(id) rescue Gravatar::IncorrectMethodParameterError raise Error, "#{id}: Unknown identifier" end end |