Module: CommandLineHelper::HelpText

Extended by:
ActiveSupport::Concern
Defined in:
lib/command_line_helper/help_text.rb

Overview

Depends on:

  • version_info (simply defined to return __PACKAGE__::VERSION)

  • options_possible

    [ ['--option', '-o', GetoptLong::OPTION_TYPE, 'Helpful message'], ... ]
    

Instance Method Summary collapse

Instance Method Details

#help_infoObject

Help information that is constructed from the options_possible defined

Returns the help text



19
20
21
22
23
24
25
26
27
28
# File 'lib/command_line_helper/help_text.rb', line 19

def help_info
  <<-EOH
Usage: #{program_name} [options]
  #{short_hand_options}

  Options:
#{option_details}
#{version_info}
  EOH
end

#version_infoObject



30
31
32
# File 'lib/command_line_helper/help_text.rb', line 30

def version_info
  VERSION
end