Sha256: d30f5994270346cfbfa95b4a85a597575f55c2f838a1ff09e469a3845f18b239

Contents?: true

Size: 631 Bytes

Versions: 19

Compression:

Stored size: 631 Bytes

Contents

module Mutant
  class Matcher
    # Match configuration
    class Config
      include Adamantium, Anima::Update, Anima.new(
        :match_expressions,
        :subject_ignores,
        :subject_selects
      )

      DEFAULT = new(Hash[anima.attribute_names.map { |name| [name, []] }])

      # Return configuration with added value
      #
      # @param [Symbol] attribute
      # @param [Object] value
      #
      # @return [Config]
      #
      # @api private
      #
      def add(attribute, value)
        update(attribute => public_send(attribute).dup << value)
      end

    end # Config
  end # Matcher
end # Mutant

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
mutant-0.8.0 lib/mutant/matcher/config.rb
mutant-0.7.9 lib/mutant/matcher/config.rb
mutant-0.7.8 lib/mutant/matcher/config.rb
mutant-0.7.7 lib/mutant/matcher/config.rb
mutant-0.7.6 lib/mutant/matcher/config.rb
mutant-0.7.5 lib/mutant/matcher/config.rb
mutant-0.7.4 lib/mutant/matcher/config.rb
mutant-0.7.3 lib/mutant/matcher/config.rb
mutant-0.7.2 lib/mutant/matcher/config.rb
mutant-0.7.1 lib/mutant/matcher/config.rb
mutant-0.6.7 lib/mutant/matcher/config.rb
mutant-0.6.6 lib/mutant/matcher/config.rb
mutant-0.6.5 lib/mutant/matcher/config.rb
mutant-0.6.4 lib/mutant/matcher/config.rb
mutant-0.6.3 lib/mutant/matcher/config.rb
mutant-0.6.2 lib/mutant/matcher/config.rb
mutant-0.6.0 lib/mutant/matcher/config.rb
mutant-0.5.26 lib/mutant/matcher/config.rb
mutant-0.5.25 lib/mutant/matcher/config.rb