Sha256: 316b593f77741ba95bfcafce5f799732b94b3d5506321113da9b809aeaa12838

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

module Glare
  class CfDnsRecord
    include Comparable

    def initialize(id:, name:, type:, content:)
      @id = id
      @name = name
      @type = type
      @content = content
    end

    def <=>(cf_dns_record)
      @type <=> cf_dns_record.type &&
        @name <=> cf_dns_record.name &&
        @content <=> cf_dns_record.content
    end

    def to_h
      {
        type: @type,
        name: @name,
        content: @content
      }
    end

    attr_reader :id, :name, :type
    attr_accessor :content
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glare-0.4.0 lib/glare/cf_dns_record.rb