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.
16 17 18 |
# File 'lib/hanamimastery/cli/commands/unshot.rb', line 16 def repository @repository end |
#transformation ⇒ Object (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 |