Class: ArticleFixtureGen::Data::WordEntryComparator

Inherits:
Object
  • Object
show all
Defined in:
lib/article_fixture_gen/data/build_word_list.rb

Overview

Compares two WordEntry instances to each other, per comparison interface.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(obj, other) ⇒ Object



24
25
26
# File 'lib/article_fixture_gen/data/build_word_list.rb', line 24

def self.call(obj, other)
  WordEntryComparator.new(obj, other).call
end

Instance Method Details

#callObject



28
29
30
31
# File 'lib/article_fixture_gen/data/build_word_list.rb', line 28

def call
  Internals.first_nonzero([dom_difference, index_difference]) || 0
  # [dom_difference, index_difference].reject(&:zero?).first
end