Class: OVH::Provisioner::APIObject::Record
- Inherits:
-
OVH::Provisioner::APIObject
- Object
- OVH::Provisioner::APIObject
- OVH::Provisioner::APIObject::Record
- Defined in:
- lib/ovh/provisioner/api_object/record.rb
Overview
Represent a record in a domain zone
Instance Attribute Summary collapse
-
#subdomain ⇒ Object
readonly
Returns the value of attribute subdomain.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#ttl ⇒ Object
readonly
Returns the value of attribute ttl.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#zone ⇒ Object
readonly
Returns the value of attribute zone.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#subdomain ⇒ Object (readonly)
Returns the value of attribute subdomain.
24 25 26 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 24 def subdomain @subdomain end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
24 25 26 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 24 def target @target end |
#ttl ⇒ Object (readonly)
Returns the value of attribute ttl.
24 25 26 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 24 def ttl @ttl end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 24 def type @type end |
#zone ⇒ Object (readonly)
Returns the value of attribute zone.
24 25 26 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 24 def zone @zone end |
Class Method Details
.print(zone, subdomain, ttl, type, target) ⇒ Object
26 27 28 29 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 26 def self.print(zone, subdomain, ttl, type, target) "#{subdomain.empty? ? "#{zone}." : subdomain} "\ "#{ttl} #{type} #{target}".strip end |
Instance Method Details
#to_s ⇒ Object
31 32 33 |
# File 'lib/ovh/provisioner/api_object/record.rb', line 31 def to_s self.class.print(zone, subdomain, ttl, type, target) end |