Class: Zonesync::Provider
- Inherits:
-
Struct
- Object
- Struct
- Zonesync::Provider
show all
- Defined in:
- lib/zonesync/provider.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#credentials ⇒ Object
Returns the value of attribute credentials
5
6
7
|
# File 'lib/zonesync/provider.rb', line 5
def credentials
@credentials
end
|
Class Method Details
.from(credentials) ⇒ Object
6
7
8
9
|
# File 'lib/zonesync/provider.rb', line 6
def self.from credentials
return credentials if credentials.is_a?(Provider)
Zonesync.const_get(credentials[:provider]).new(credentials)
end
|
Instance Method Details
#add(record) ⇒ Object
43
44
45
|
# File 'lib/zonesync/provider.rb', line 43
def add record
raise NotImplementedError
end
|
#change(old_record, new_record) ⇒ Object
39
40
41
|
# File 'lib/zonesync/provider.rb', line 39
def change old_record, new_record
raise NotImplementedError
end
|
#diffable_records ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/zonesync/provider.rb', line 11
def diffable_records
zonefile.records.map do |record|
Record.from_dns_zonefile_record(record)
end.select do |record|
%w[A AAAA CNAME MX TXT SPF NAPTR PTR].include?(record.type)
end.sort
end
|
#read(record) ⇒ Object
27
28
29
|
# File 'lib/zonesync/provider.rb', line 27
def read record
raise NotImplementedError
end
|
#remove(record) ⇒ Object
35
36
37
|
# File 'lib/zonesync/provider.rb', line 35
def remove record
raise NotImplementedError
end
|
#write(text) ⇒ Object
31
32
33
|
# File 'lib/zonesync/provider.rb', line 31
def write text
raise NotImplementedError
end
|