Sha256: 21d7f4059aba28936a9a75855bd4f7f0ba604892a39b2f3dd9cdc4bc24ac49d8

Contents?: true

Size: 572 Bytes

Versions: 5

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true

class FastIgnore
  class Rule
    FNMATCH_OPTIONS = (::File::FNM_DOTMATCH | ::File::FNM_PATHNAME | ::File::FNM_CASEFOLD).freeze # = 14

    attr_reader :negation
    alias_method :negation?, :negation
    attr_reader :dir_only
    alias_method :dir_only?, :dir_only

    attr_reader :rule

    def initialize(rule, dir_only, negation)
      @rule = rule
      @dir_only = dir_only
      @negation = negation
    end

    # :nocov:
    def inspect
      "#<Rule #{'!' if negation?}#{rule}#{'/' if dir_only?}>"
    end
    # :nocov:
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fast_ignore-0.8.3 lib/fast_ignore/rule.rb
fast_ignore-0.8.2 lib/fast_ignore/rule.rb
fast_ignore-0.8.1 lib/fast_ignore/rule.rb
fast_ignore-0.8.0 lib/fast_ignore/rule.rb
fast_ignore-0.7.0 lib/fast_ignore/rule.rb