Class: Hiera::Backend::Eyaml::Subcommands::UnknownCommand

Inherits:
Hiera::Backend::Eyaml::Subcommand show all
Defined in:
lib/hiera/backend/eyaml/subcommands/unknown_command.rb

Constant Summary collapse

@@original_command =
"unknown"

Class Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Hiera::Backend::Eyaml::Subcommand

all_options, attach_option, find, parse, prettyname, validate

Class Attribute Details

.original_commandObject

Returns the value of attribute original_command.



11
12
13
# File 'lib/hiera/backend/eyaml/subcommands/unknown_command.rb', line 11

def original_command
  @original_command
end

Class Method Details

.descriptionObject



20
21
22
# File 'lib/hiera/backend/eyaml/subcommands/unknown_command.rb', line 20

def self.description
  "Unknown command (#{@@original_command})"
end

.executeObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/hiera/backend/eyaml/subcommands/unknown_command.rb', line 24

def self.execute
  subcommands = Eyaml.subcommands
  puts "Unknown subcommand\#{ \": \" + Eyaml.subcommand if Eyaml.subcommand }\n\nUsage: eyaml <subcommand>\n\nPlease use one of the following subcommands or help for more help:\n  \#{Eyaml.subcommands.sort.collect {|command|\n  command_class = Subcommands.const_get(Utils.camelcase command)\n  command unless command_class.hidden?\n}.compact.join(\", \")}\n"
end

.hidden?Boolean



39
40
41
# File 'lib/hiera/backend/eyaml/subcommands/unknown_command.rb', line 39

def self.hidden?
  true
end

.optionsObject



16
17
18
# File 'lib/hiera/backend/eyaml/subcommands/unknown_command.rb', line 16

def self.options
  []
end