Class: Umwelt::Episode::Mapper

Inherits:
Abstract::Mapper show all
Defined in:
lib/umwelt/episode/mapper.rb

Instance Method Summary collapse

Methods inherited from Abstract::Mapper

#fill

Methods inherited from Abstract::Interactor

#prove

Instance Method Details

#call(data = { phase: {}, engaged: [], forgotten: [] }) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/umwelt/episode/mapper.rb', line 8

def call(
  data = {
    phase: {},
    engaged: [],
    forgotten: []
  }
)

  @struct = Struct::Episode.new(
    phase: phase(data[:phase]),
    engaged: fragments(data[:engaged]),
    forgotten: data[:forgotten]
  )
end