Class: DnsMock::Record::Builder::Base
- Inherits:
-
Object
- Object
- DnsMock::Record::Builder::Base
- Defined in:
- lib/dns_mock/record/builder/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(target_factory, records_data) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(target_factory, records_data) ⇒ Base
Returns a new instance of Base.
11 12 13 14 |
# File 'lib/dns_mock/record/builder/base.rb', line 11 def initialize(target_factory, records_data) @target_factory = target_factory @records_data = records_data end |
Class Method Details
.call(target_factory, records_data) ⇒ Object
7 8 9 |
# File 'lib/dns_mock/record/builder/base.rb', line 7 def self.call(target_factory, records_data) new(target_factory, records_data).build end |
Instance Method Details
#build ⇒ Object
16 17 18 |
# File 'lib/dns_mock/record/builder/base.rb', line 16 def build records_data.map { |record_data| target_factory.new(record_data: record_data).create } end |