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
45
46
47
|
# File 'lib/zonesync/provider.rb', line 45
def add record
raise NotImplementedError
end
|
#change(old_record, new_record) ⇒ Object
41
42
43
|
# File 'lib/zonesync/provider.rb', line 41
def change old_record, new_record
raise NotImplementedError
end
|
#diffable_records ⇒ Object
11
12
13
14
15
16
17
18
19
|
# 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.reject do |record|
record..to_s.downcase.include? "zonesync: ignore"
end.sort
end
|
#read(record) ⇒ Object
29
30
31
|
# File 'lib/zonesync/provider.rb', line 29
def read record
raise NotImplementedError
end
|
#remove(record) ⇒ Object
37
38
39
|
# File 'lib/zonesync/provider.rb', line 37
def remove record
raise NotImplementedError
end
|
#write(text) ⇒ Object
33
34
35
|
# File 'lib/zonesync/provider.rb', line 33
def write text
raise NotImplementedError
end
|