Class: Hanamimastery::CLI::Commands::ToNotion

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

Instance Method Summary collapse

Instance Method Details

#call(episode:, save:) ⇒ Object



16
17
18
19
20
# File 'lib/hanamimastery/cli/commands/to_notion.rb', line 16

def call(episode:, save:, **)
  content = repository.fetch(episode).content
  processed = transformation.call(content)
  save ? File.write("#{episode}-episode.html", processed) : puts(processed)
end