Class: Benoit::Pipeline::PaginationMatcher

Inherits:
Rake::Pipeline::Matcher
  • Object
show all
Defined in:
lib/benoit/pipeline/pagination_matcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#collection_totalsObject (readonly)

Returns the value of attribute collection_totals.



4
5
6
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 4

def collection_totals
  @collection_totals
end

#per_page_countsObject (readonly)

Returns the value of attribute per_page_counts.



4
5
6
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 4

def per_page_counts
  @per_page_counts
end

#previous_input_filesObject (readonly)

Returns the value of attribute previous_input_files.



4
5
6
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 4

def previous_input_files
  @previous_input_files
end

Instance Method Details

#eligible_input_filesObject



17
18
19
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 17

def eligible_input_files
  per_page_counts.keys
end

#output_filesObject



13
14
15
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 13

def output_files
  super + input_files
end

#setup_filtersObject



6
7
8
9
10
11
# File 'lib/benoit/pipeline/pagination_matcher.rb', line 6

def setup_filters
  @previous_input_files = pipeline.input_files
  calculate_collection_totals
  calculate_per_page_counts
  super
end