Class: Hanamimastery::CLI::Commands::Touch

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/hanamimastery/cli/commands/touch.rb

Instance Method Summary collapse

Instance Method Details

#call(episode:, timestamp:) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/hanamimastery/cli/commands/touch.rb', line 18

def call(episode:, timestamp:, **)
  timestamp = Time.parse(timestamp)
  content = repository.read(episode)
  processed =
    transformation.call(
      content, timestamp: timestamp
    )
  repository.replace(episode, processed)
end