Module: CodePicture::Cli::Commands::Help

Defined in:
lib/code_picture/cli/commands/help.rb

Constant Summary collapse

Options =
Data.define(:error, :help_text) do
  def initialize(help_text:, error: nil) = super
end

Class Method Summary collapse

Class Method Details

.call(options) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/code_picture/cli/commands/help.rb', line 9

def self.call(options)
  puts options.help_text

  if options.error
    Result::Failure.new(error: options.error)
  else
    Result::Success.new(value: nil)
  end
end