Class: Pennyworth::CLI::Actions::Text

Inherits:
Sod::Action
  • Object
show all
Defined in:
lib/pennyworth/cli/actions/text.rb

Overview

Handles the text action.

Instance Method Summary collapse

Constructor Details

#initialize(processor: Processor.for_text) ⇒ Text

Returns a new instance of Text.



16
17
18
19
# File 'lib/pennyworth/cli/actions/text.rb', line 16

def initialize(processor: Processor.for_text, **)
  super(**)
  @processor = processor
end

Instance Method Details

#call(content) ⇒ Object



21
# File 'lib/pennyworth/cli/actions/text.rb', line 21

def call(content) = io.puts processor.call(content).to_json