Class: HammerCLI::Options::Normalizers::List

Inherits:
AbstractNormalizer show all
Defined in:
lib/hammer_cli/options/normalizers.rb

Instance Method Summary collapse

Methods inherited from AbstractNormalizer

#complete

Instance Method Details

#descriptionObject



88
89
90
# File 'lib/hammer_cli/options/normalizers.rb', line 88

def description
  _("Comma separated list of values. Values containing comma should be quoted or escaped with backslash")
end

#format(val) ⇒ Object



92
93
94
# File 'lib/hammer_cli/options/normalizers.rb', line 92

def format(val)
  (val.is_a?(String) && !val.empty?) ? HammerCLI::CSVParser.new.parse(val) : []
end