Sha256: bec64ac3f4cbbde36b7a22d61060e90463761f7a4bfd0c8a16d1941a01d69821
Contents?: true
Size: 604 Bytes
Versions: 10
Compression:
Stored size: 604 Bytes
Contents
module DNSimple module Commands class RegisterDomain def execute(args, options={}) name = args.shift registrant = {:id => args.shift} extended_attributes = {} args.each do |arg| n, v = arg.split(":") extended_attributes[n] = v end domain = Domain.register(name, registrant, extended_attributes) puts "Registered #{domain.name}" if template = options.delete(:template) domain.apply(template) puts "Applied template #{template} to #{domain.name}" end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems