Class: Jenkins2::CLI::GetNode
Instance Attribute Summary
#errors, #options
Class Method Summary
collapse
Instance Method Summary
collapse
#call, class_to_command, #initialize, #parse, subcommands
Constructor Details
This class inherits a constructor from Jenkins2::CLI
Class Method Details
.description ⇒ Object
88
89
90
|
# File 'lib/jenkins2/cli/nodes.rb', line 88
def self.description
'Dump the node definition XML to stdout.'
end
|
Instance Method Details
#add_options ⇒ Object
92
93
94
95
96
97
|
# File 'lib/jenkins2/cli/nodes.rb', line 92
def add_options
parser.separator 'Mandatory arguments:'
parser.on '-n', '--name NAME', 'Name of the node.' do |n|
options[:name] = n
end
end
|
#run ⇒ Object
99
100
101
|
# File 'lib/jenkins2/cli/nodes.rb', line 99
def run
jc.computer(options[:name]).config_xml
end
|