Class: Freenom::DNSRecordCreator
- Defined in:
- lib/freenom/dns/explorers/dns_record_creator.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
Instance Method Summary collapse
-
#initialize(domain:) ⇒ DNSRecordCreator
constructor
A new instance of DNSRecordCreator.
- #run(name:, type:, time_to_live:, target:) ⇒ Object
Methods included from ExtendedCapybaraDSL
Methods included from Expecting
Constructor Details
#initialize(domain:) ⇒ DNSRecordCreator
Returns a new instance of DNSRecordCreator.
10 11 12 |
# File 'lib/freenom/dns/explorers/dns_record_creator.rb', line 10 def initialize(domain:) @domain = domain end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
8 9 10 |
# File 'lib/freenom/dns/explorers/dns_record_creator.rb', line 8 def domain @domain end |
Instance Method Details
#run(name:, type:, time_to_live:, target:) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/freenom/dns/explorers/dns_record_creator.rb', line 14 def run(name:, type:, time_to_live:, target:) Freenom::DNSRecordsVisitor.new(domain: @domain).run fill_in_record_attributes(name, type, time_to_live, target) save_record! raise RecordCreateError, if error_occurred? true end |