Module: EacCli::RunnerWith::Help

Defined in:
lib/eac_cli/runner_with/help.rb,
lib/eac_cli/runner_with/help/builder.rb,
lib/eac_cli/runner_with/help/list_section.rb,
lib/eac_cli/runner_with/help/builder/alternative.rb

Defined Under Namespace

Classes: Builder, ListSection

Instance Method Summary collapse

Instance Method Details

#help_runObject



23
24
25
26
27
28
# File 'lib/eac_cli/runner_with/help.rb', line 23

def help_run
  return unless show_help?

  puts help_text
  raise ::EacCli::Runner::Exit
end

#help_textString

Returns:

  • (String)


31
32
33
# File 'lib/eac_cli/runner_with/help.rb', line 31

def help_text
  ::EacCli::RunnerWith::Help::Builder.new(self).to_s
end

#show_help?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/eac_cli/runner_with/help.rb', line 35

def show_help?
  parsed.help? && !if_respond(:run_subcommand?, false)
end