Class: Glare::CfDnsRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/glare/cf_dns_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, type:, content:, proxied: false, ttl:) ⇒ CfDnsRecord

Returns a new instance of CfDnsRecord.



3
4
5
6
7
8
9
10
# File 'lib/glare/cf_dns_record.rb', line 3

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

Instance Attribute Details

#contentObject

Returns the value of attribute content.



31
32
33
# File 'lib/glare/cf_dns_record.rb', line 31

def content
  @content
end

#idObject (readonly)

Returns the value of attribute id.



30
31
32
# File 'lib/glare/cf_dns_record.rb', line 30

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



30
31
32
# File 'lib/glare/cf_dns_record.rb', line 30

def name
  @name
end

#proxiedObject

Returns the value of attribute proxied.



31
32
33
# File 'lib/glare/cf_dns_record.rb', line 31

def proxied
  @proxied
end

#ttlObject

Returns the value of attribute ttl.



31
32
33
# File 'lib/glare/cf_dns_record.rb', line 31

def ttl
  @ttl
end

#typeObject (readonly)

Returns the value of attribute type.



30
31
32
# File 'lib/glare/cf_dns_record.rb', line 30

def type
  @type
end

Instance Method Details

#==(cf_dns_record) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/glare/cf_dns_record.rb', line 12

def ==(cf_dns_record)
  @type == cf_dns_record.type &&
    @name == cf_dns_record.name &&
    @content == cf_dns_record.content &&
    @proxied == cf_dns_record.proxied &&
    @ttl == cf_dns_record.ttl
end

#to_hObject



20
21
22
23
24
25
26
27
28
# File 'lib/glare/cf_dns_record.rb', line 20

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