Method: Beaker::Subcommands::SubcommandUtil.execute_subcommand?

Defined in:
lib/beaker/subcommands/subcommand_util.rb

.execute_subcommand?(arg0) ⇒ Boolean

Check if the first argument to the beaker execution is a subcommand

Returns:

  • (Boolean)

    true if argv is “help” or a method defined in the Subcommands class, false otherwise



23
24
25
26
# File 'lib/beaker/subcommands/subcommand_util.rb', line 23

def self.execute_subcommand?(arg0)
  return false if arg0.nil?
  (Beaker::Subcommand.instance_methods(false) << :help).include? arg0.to_sym
end