Sha256: adaa5fb82856ddd6329bb7e659b691ac2ea206bc22cd276479ae9d8dfe08f3cf

Contents?: true

Size: 457 Bytes

Versions: 7

Compression:

Stored size: 457 Bytes

Contents

module RecordStore
  class Record::ALIAS < Record
    attr_accessor :alias

    validates :alias, presence: true, format: { with: Record::CNAME_REGEX, message: 'is not a fully qualified domain name' }

    def initialize(record)
      super
      @alias = Record.ensure_ends_with_dot(record.fetch(:alias))
    end

    def rdata
      { alias: self.alias }
    end

    def to_s
      "[ALIASRecord] #{fqdn} #{ttl} IN ALIAS #{self.alias}"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
record_store-4.0.0 lib/record_store/record/alias.rb
record_store-3.1.4 lib/record_store/record/alias.rb
record_store-3.1.3 lib/record_store/record/alias.rb
record_store-3.1.1 lib/record_store/record/alias.rb
record_store-3.1.0 lib/record_store/record/alias.rb
record_store-3.0.0 lib/record_store/record/alias.rb
record_store-2.1.0 lib/record_store/record/alias.rb