Sha256: b53a3f2420c25e54088ab7212cebcfd643bd80d97c025e16cba7a42cd9a02a5a
Contents?: true
Size: 491 Bytes
Versions: 20
Compression:
Stored size: 491 Bytes
Contents
# frozen_string_literal: true # Color printing option # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::Option.newoption(:color) do has_weight 80 def parse(parser, options) parser.on('--[no-]color', 'Enable/disable colors in output') do |color| options[:colors] = color options[:format] = color ? :color_text : :text end end end
Version data entries
20 entries across 20 versions & 1 rubygems