Class: Looks::Command::AccountManagement

Inherits:
Base
  • Object
show all
Defined in:
lib/looks/command/account_management.rb

Direct Known Subclasses

Add, Addresses, Images, Rm, Set

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize, #run, #to_s, #usage

Constructor Details

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

Instance Method Details

#configure(opts) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/looks/command/account_management.rb', line 7

def configure(opts)
  super

  opts.on('-e', '--email ADDRESS', "Gravatar email address") do |address|
    config.address = address
  end

  opts.on('-p', '--password PASSWORD', "Gravatar password") do |password|
    config.password = password
  end
end

#execute(args) ⇒ Object



19
20
21
# File 'lib/looks/command/account_management.rb', line 19

def execute(args)
  usage unless config.address && config.password
end