Class: Puppet::Util::CommandLine::NilSubcommand Private

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet/util/command_line.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

UnknownSubcommand

Instance Method Summary collapse

Constructor Details

#initialize(command_line) ⇒ NilSubcommand

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of NilSubcommand.



155
156
157
# File 'lib/puppet/util/command_line.rb', line 155

def initialize(command_line)
  @command_line = command_line
end

Instance Method Details

#runObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



159
160
161
162
163
164
165
# File 'lib/puppet/util/command_line.rb', line 159

def run
  if @command_line.args.include? "--version" or @command_line.args.include? "-V"
    puts Puppet.version
  else
    puts "See 'puppet help' for help on available puppet subcommands"
  end
end