Class: Smith::Workflow::Composite::Preparation

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/smith/workflow/composite/preparation.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Preparation

Returns a new instance of Preparation.



14
15
16
17
18
19
20
21
22
23
# File 'lib/smith/workflow/composite/preparation.rb', line 14

def initialize(attributes)
  super
  unless plan.input_digest == input.digest
    raise ArgumentError,
          "composite preparation input does not match plan"
  end

  self.attributes.freeze
  freeze
end