Class: OVH::Provisioner::APIObject::Record

Inherits:
OVH::Provisioner::APIObject show all
Defined in:
lib/ovh/provisioner/api_object/record.rb

Overview

Represent a record in a domain zone

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#subdomainObject (readonly)

Returns the value of attribute subdomain.



24
25
26
# File 'lib/ovh/provisioner/api_object/record.rb', line 24

def subdomain
  @subdomain
end

#targetObject (readonly)

Returns the value of attribute target.



24
25
26
# File 'lib/ovh/provisioner/api_object/record.rb', line 24

def target
  @target
end

#ttlObject (readonly)

Returns the value of attribute ttl.



24
25
26
# File 'lib/ovh/provisioner/api_object/record.rb', line 24

def ttl
  @ttl
end

#typeObject (readonly)

Returns the value of attribute type.



24
25
26
# File 'lib/ovh/provisioner/api_object/record.rb', line 24

def type
  @type
end

#zoneObject (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



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_sObject



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