Class: Freenom::DNSRecordsVisitor

Inherits:
Explorer
  • Object
show all
Defined in:
lib/freenom/dns/explorers/dns_records_visitor.rb

Constant Summary collapse

DOMAINS_URL =
'https://my.freenom.com/clientarea.php?action=domains'
DNS_RECORDS_URL =
'https://my.freenom.com/clientarea.php?managedns=%s&domainid=%s'

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ExtendedCapybaraDSL

#text?

Methods included from Expecting

#expecting

Constructor Details

#initialize(domain:) ⇒ DNSRecordsVisitor

Returns a new instance of DNSRecordsVisitor.



12
13
14
# File 'lib/freenom/dns/explorers/dns_records_visitor.rb', line 12

def initialize(domain:)
  @domain = domain
end

Instance Attribute Details

#domainObject

Returns the value of attribute domain.



10
11
12
# File 'lib/freenom/dns/explorers/dns_records_visitor.rb', line 10

def domain
  @domain
end

Instance Method Details

#runObject

Raises:



16
17
18
19
20
21
# File 'lib/freenom/dns/explorers/dns_records_visitor.rb', line 16

def run
  id = fetch_domain_id
  raise DomainError unless id
  visit format(DNS_RECORDS_URL, @domain, id)
  id
end