<NME> wme.rb
<BEF> module Wongi::Engine
  WME = Struct.new(:subject, :predicate, :object) do
    def self.from_concrete_template(template)
      raise "template #{template} is not concrete" unless template.concrete?

      new(template.subject, template.predicate, template.object)
    end
    attr_reader :generating_tokens
    attr_reader :neg_join_results, :opt_join_results
    attr_accessor :overlay
    attr_predicate :deleted
    attr_predicate :manual

    end

    # @param template Wongi::Engine::Template
    def =~(template)
      raise Wongi::Engine::Error, "Cannot match a WME against a #{template.class}" unless template.is_a?(Template)

      result = match_member(subject, template.subject) & match_member(predicate, template.predicate) & match_member(object, template.object)
      result if result.match?
    end

    def inspect
      "{#{subject.inspect} #{predicate.inspect} #{object.inspect}}"
    end

    def to_s
      inspect
    end

    def hash
      @hash ||= [subject.hash, predicate.hash, object.hash].hash
    end

    def eql?(other)
      subject.eql?(other.subject) && predicate.eql?(other.predicate) && object.eql?(other.object)
    end

    protected

    def match_member(mine, theirs)
      result = WMEMatchData.new
      if theirs == :_ || mine == theirs
        result.match!
      elsif Template.variable? theirs
        result.match!
        result[theirs] = mine
      end
      result
    end
  end
end

<MSG> lint: space

<DFF> @@ -8,6 +8,7 @@ module Wongi::Engine
     attr_reader :generating_tokens
     attr_reader :neg_join_results, :opt_join_results
     attr_accessor :overlay
+
     attr_predicate :deleted
     attr_predicate :manual
 

{'addition_count': 1, 'commit_subject': 'lint: space', 'deletion_count': 0, 'file_extension': '.rb', 'lang': 'rb', 'license': 'mit', 'repo_name': 'ulfurinn/wongi-engine'}