Class: Hieracles::Options::Ppdb

Inherits:
Hieracles::Optparse show all
Defined in:
lib/hieracles/options/ppdb.rb

Instance Attribute Summary

Attributes inherited from Hieracles::Optparse

#options, #payload

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Hieracles::Optparse

#initialize, #optionkeys

Constructor Details

This class inherits a constructor from Hieracles::Optparse

Class Method Details

.usageObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/hieracles/options/ppdb.rb', line 20

def self.usage
  return <<-END

Usage: ppdb <command> [extra_args]

Available commands:
  node info <fqdn>
  node facts <fqdn>
  node resources <fqdn>
  facts <name> <value>
  same <name> <fqdn>
  factnames
  res[ources] <query>
        query following the form:
        type=sometype title=what
        type=sometype or type=another
        type~someregexp type!~excluded
  END
end

Instance Method Details

#available_optionsObject



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/hieracles/options/ppdb.rb', line 7

def available_options
  {
    version: {
      has_arg: false,
      aliases: ['v', 'version']
    },
    format: {
      has_arg: true,
      aliases: ['f', 'format']
    }
  }
end