module HammerCLIForemanPuppet::AssociatingCommands::ExtendCommands

Public Instance Methods

create_subcommand(name = :PuppetEnvironment) click to toggle source
# File lib/hammer_cli_foreman_puppet/associating_commands/associating_commands.rb, line 4
def create_subcommand(name = :PuppetEnvironment)
  commands = constants.select { |c| c.to_s.include? name.to_s }.map { |p| const_get(p)}
  commands.each do |command|
    subcommand(command.command_name, command.desc, command, warning: command.warning)
  end
end