Class: DNSimple::Commands::ListAppliedServices

Inherits:
Object
  • Object
show all
Defined in:
lib/dnsimple/commands/list_applied_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_applied_services.rb', line 4

def execute(args, options={})
  domain_name = args.shift
  domain = Domain.find(domain_name)
  services = domain.applied_services
  puts "Found #{services.length} applied 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