class HammerCLIForemanRemoteExecution::Options::Normalizers::KeyFileList

Public Instance Methods

complete(value) click to toggle source
# File lib/hammer_cli_foreman_remote_execution/options/normalizers.rb, line 13
def complete(value)
  Dir[value.to_s+'*'].collect do |file|
    if ::File.directory?(file)
      file+'/'
    else
      file+' '
    end
  end
end
description() click to toggle source
# File lib/hammer_cli_foreman_remote_execution/options/normalizers.rb, line 5
def description
  _('Comma-separated list of key=file, where file is a path to a text file to be read')
end
format(val) click to toggle source
# File lib/hammer_cli_foreman_remote_execution/options/normalizers.rb, line 9
def format(val)
  Hash[super.map { |key, path| [key, ::File.read(::File.expand_path(path))] }]
end