Class: Etcher::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/etcher/builder.rb

Overview

Builds a configuration.

Instance Method Summary collapse

Constructor Details

#initialize(registry = Registry.new) ⇒ Builder

Returns a new instance of Builder.



14
15
16
# File 'lib/etcher/builder.rb', line 14

def initialize registry = Registry.new
  @registry = registry
end

Instance Method Details

#call(**overrides) ⇒ Object



18
19
20
21
22
# File 'lib/etcher/builder.rb', line 18

def call(**overrides)
  load(overrides).then { |content| transform content }
                 .bind { |content| validate content }
                 .bind { |content| record content }
end