Class: Hanamimastery::CLI::Commands::Unshot

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#repositoryObject (readonly)

Returns the value of attribute repository.



16
17
18
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 16

def repository
  @repository
end

#transformationObject (readonly)

Returns the value of attribute transformation.



16
17
18
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 16

def transformation
  @transformation
end

Instance Method Details

#call(episode:) ⇒ Object



18
19
20
21
22
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 18

def call(episode:, **)
  content = repository.read(episode)
  processed = transformation.call(content, one: false)
  repository.replace(episode, processed)
end