module DLDInternet::OpenSRS::Domain::Zone::MixIns::NoCommands

Public Instance Methods

zone_records_format(*args) click to toggle source

f556592444564103d2c17317bebca3de.ds1 CNAME 896e2ecc4a5528f39b306a5bb96afaedc7bf7824.comodoca.com

# File lib/dldinternet/opensrs/domain/zone/mixins/no_commands.rb, line 14
def zone_records_format(*args)
  if args.size > 0
    raise "TODO: Set column widths to fit data"
  else
    @header = -> { sprintf("%-48s\t%-5s\t%-8s\t%-64s\t%-5s\t%-5s", 'Subdomain', 'Type', 'Priority', 'Host', 'Weight', 'Port') }
    @format = ->(res) { sprintf("%-48s\t%-5s\t%-8s\t%-64s\t%-5s\t%-5s", res['subdomain'], res['type'], res['priority'], res['data'], res['weight'], res['port']) }
  end
end