Sha256: 992880e0eaf8bf910f28621d4f409c02e94949dc080bdaf16781b7508768f466
Contents?: true
Size: 539 Bytes
Versions: 14
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true module OptParseValidator # Implementation of the Alias Option class OptAlias < OptBase def initialize(option, attrs = {}) raise Error, 'The :alias_for attribute is required' unless attrs.key?(:alias_for) super(option, attrs) end def append_help_messages super option << "Alias for #{alias_for}" end # @return [ String ] def alias_for @alias_for ||= attrs[:alias_for] end # @return [ Boolean ] def alias? true end end end
Version data entries
14 entries across 14 versions & 1 rubygems