class Chef::Knife::ClientKeyShow
@attr_reader [String] actor the name of the client that this key is for
@author Tyler Cloke
as a service class.
Implements knife client key show using Chef::Knife::KeyShow
def actor_missing_error
def actor_missing_error "You must specify a client name" end
def apply_params!(params)
def apply_params!(params) @actor = params[0] if @actor.nil? show_usage ui.fatal(actor_missing_error) exit 1 end @name = params[1] if @name.nil? show_usage ui.fatal(keyname_missing_error) exit 1 end end
def initialize(argv = [])
def initialize(argv = []) super(argv) @service_object = nil end
def keyname_missing_error
def keyname_missing_error "You must specify a key name" end
def load_method
def load_method :load_by_client end
def run
def run apply_params!(@name_args) service_object.run end
def service_object
def service_object @service_object ||= Chef::Knife::KeyShow.new(@name, @actor, load_method, ui) end