Sha256: 330264b5613c674eae9c2611a3f4cb545c2868f3dca1448c741b01d97fb30a74

Contents?: true

Size: 597 Bytes

Versions: 20

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

# Specify attributes to ignore
# @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(:ignore_attr) do
  has_weight 190

  def parse(parser, options)
    parser.on('--ignore-attr "attr1,attr2,..."', Array, 'Attributes to ignore') do |res|
      options[:ignore] ||= []
      res.each do |item|
        item_subst = item.gsub(/(\\f|::)/, "\f")
        options[:ignore] << { attr: item_subst }
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
octocatalog-diff-2.3.1 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-2.3.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-2.1.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-2.0.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.6.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.5.4 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.5.3 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.5.2 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.5.1 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.5.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.4.1 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.4.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.3.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.2.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.1.0 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.0.4 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.0.3 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.0.2 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.0.1 lib/octocatalog-diff/cli/options/ignore_attr.rb
octocatalog-diff-1.0.0 lib/octocatalog-diff/cli/options/ignore_attr.rb