Sha256: 7e6f5f5c2ec851fd954f94271747935765ce4017bcdc4a43e11567987331beaf
Contents?: true
Size: 696 Bytes
Versions: 26
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 fields or predefined field 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
26 entries across 26 versions & 1 rubygems