Class: Umwelt::Episode::File::Restore

Inherits:
Abstract::File::Restore show all
Defined in:
lib/umwelt/episode/file/restore.rb

Instance Method Summary collapse

Methods inherited from Abstract::Interactor

#prove

Constructor Details

#initialize(path: '.umwelt', mapper: Umwelt::Episode::Mapper) ⇒ Restore

Returns a new instance of Restore.



7
8
9
10
11
12
# File 'lib/umwelt/episode/file/restore.rb', line 7

def initialize(
  path: '.umwelt',
  mapper: Umwelt::Episode::Mapper
)
  super
end

Instance Method Details

#call(phase_id) ⇒ Object



14
15
16
# File 'lib/umwelt/episode/file/restore.rb', line 14

def call(phase_id)
  @struct = struct parse read full_path phase_id
end

#full_path(phase_id) ⇒ Object



18
19
20
# File 'lib/umwelt/episode/file/restore.rb', line 18

def full_path(phase_id)
  umwelt_root_path / "episodes/#{phase_id}.json"
end