Class: Cloudflare::DNS::Record
- Inherits:
-
Representation
- Object
- Async::REST::Representation
- Representation
- Cloudflare::DNS::Record
show all
- Includes:
- Async::REST::Representation::Mutable
- Defined in:
- lib/cloudflare/dns.rb
Constant Summary
Representation::WRAPPER
Instance Method Summary
collapse
#errors, #messages, #represent, #represent_message, #representation, #result, #results, #success?, #to_hash, #to_id
Instance Method Details
#content ⇒ Object
42
43
44
|
# File 'lib/cloudflare/dns.rb', line 42
def content
result[:content]
end
|
#name ⇒ Object
38
39
40
|
# File 'lib/cloudflare/dns.rb', line 38
def name
result[:name]
end
|
#proxied? ⇒ Boolean
Also known as:
proxied
46
47
48
|
# File 'lib/cloudflare/dns.rb', line 46
def proxied?
result[:proxied]
end
|
#to_s ⇒ Object
52
53
54
|
# File 'lib/cloudflare/dns.rb', line 52
def to_s
"#{self.name} #{self.type} #{self.content}"
end
|
#type ⇒ Object
34
35
36
|
# File 'lib/cloudflare/dns.rb', line 34
def type
result[:type]
end
|
#update_content(content, **options) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/cloudflare/dns.rb', line 16
def update_content(content, **options)
self.class.put(@resource, {
type: self.type,
name: self.name,
content: content,
**options
}) do |resource, response|
if response.success?
@value = response.read
@metadata = response.
else
raise RequestError.new(resource, response.read)
end
self
end
end
|