Class: DNSimple::Commands::ListAvailableServices

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/list_available_services.rb

Instance Method Summary collapse

Instance Method Details

#execute(args, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/dnsimple/commands/list_available_services.rb', line 4

def execute(args, options={})
  domain_name = args.shift
  domain = Domain.find(domain_name)
  services = domain.available_services
  puts "Found #{services.length} available services for #{domain_name}"
  services.each do |service|
    puts "\t#{service.name} (short: #{service.short_name}, id: #{service.id})"
    puts "\t\t#{service.description}"
  end
end