Sha256: e679e986993e1c83458368532ad9b80faabea4940b26b736cadea187d425354c

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

module Clouddns
  module Actions
    module PrintRecord
      protected
      def print_record record, namelength, prefix=''
        values = record.respond_to?(:value) ? record.value : record.ip
        values.each_with_index do |value, i|
          if i.zero?
            args = [prefix, record.type, record.ttl, record.name, value]
          else
            args = [prefix, '', '', '', value]
          end
          puts "%s%5s %5s %#{namelength}s %s" % args
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clouddns-0.0.2 lib/clouddns/actions/print_record.rb
clouddns-0.0.1 lib/clouddns/actions/print_record.rb