Class: ArticleFixtureGen::Data::BuildTargetEntryList

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

Overview

Builds a word list suitable for randomly selecting MTP locations; these may be used for either single- or paired-marker tag pairs by the simple expedient of reverse-sorting the returned list of entries. Existing MTPs in the content will be unaffected, as they will be treated as any other element node and, since they have no contained text, will not affect the result.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(parent_node, count) ⇒ Object



14
15
16
# File 'lib/article_fixture_gen/data/build_target_entry_list.rb', line 14

def self.call(parent_node, count)
  new(parent_node, count).call
end

Instance Method Details

#callObject



18
19
20
# File 'lib/article_fixture_gen/data/build_target_entry_list.rb', line 18

def call
  entries.sort.reverse
end