Module: EacRubyUtils::Console::DocoptRunner::SubcommandsSupport::SubcommandArgAsList

Defined in:
lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb

Instance Method Summary collapse

Instance Method Details

#subcommand_nameObject


131
132
133
134
135
136
# File 'lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb', line 131

def subcommand_name
  available_subcommands.each do |subcommand|
    return subcommand if options.fetch(subcommand)
  end
  nil
end

#subcommands_target_docObject


138
139
140
# File 'lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb', line 138

def subcommands_target_doc
  "\n"
end

#target_doc_subcommand_argObject


127
128
129
# File 'lib/eac_ruby_utils/console/docopt_runner/_subcommands.rb', line 127

def target_doc_subcommand_arg
  '(' + available_subcommands.join('|') + ')'
end