Class: Hanamimastery::CLI::Commands::Unshot
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Hanamimastery::CLI::Commands::Unshot
- Defined in:
- lib/hanamimastery/cli/commands/unshot.rb
Instance Attribute Summary collapse
-
#repository ⇒ Object
readonly
Returns the value of attribute repository.
-
#transformation ⇒ Object
readonly
Returns the value of attribute transformation.
Instance Method Summary collapse
Instance Attribute Details
#repository ⇒ Object (readonly)
Returns the value of attribute repository.
15 16 17 |
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 15 def repository @repository end |
#transformation ⇒ Object (readonly)
Returns the value of attribute transformation.
15 16 17 |
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 15 def transformation @transformation end |
Instance Method Details
#call(episode:) ⇒ Object
17 18 19 20 21 |
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 17 def call(episode:, **) content = repository.read(episode) processed = transformation.call(content, one: false) repository.replace(episode, processed) end |