Sha256: fcd19cbf77020c706d41e86f0f9e2ebf0b75a69a581298433c898b17c5fe3420
Contents?: true
Size: 696 Bytes
Versions: 7
Compression:
Stored size: 696 Bytes
Contents
# frozen_string_literal: true module HammerCLI module Options # Contains predefined by HammerCLI options for commands module Predefined OPTIONS = { fields: [['--fields'], 'FIELDS', _('Show specified fileds or predefined filed sets only. (See below)'), format: HammerCLI::Options::Normalizers::List.new, context_target: :fields] }.freeze def self.use(option_name, command_class) unless OPTIONS.key?(option_name) raise ArgumentError, _('There is no such predefined option %s.') % option_name end command_class.send(:option, *OPTIONS[option_name]) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems