class Govuk::Diff::Pages::PageIndexer

Public Class Methods

new() click to toggle source
# File lib/govuk/diff/pages/page_indexer.rb, line 7
def initialize
  @pages = []
  @config = AppConfig.new(Govuk::Diff::Pages.settings_file)
end

Public Instance Methods

run() click to toggle source
# File lib/govuk/diff/pages/page_indexer.rb, line 12
def run
  formats = FormatSearcher.new(@config).run
  @pages = PageSearcher.new(@config, formats).run
  File.open(Govuk::Diff::Pages.govuk_pages_file, 'w') do |fp|
    fp.puts @pages.sort.to_yaml
  end
end

Private Instance Methods

get_formats() click to toggle source
# File lib/govuk/diff/pages/page_indexer.rb, line 22
def get_formats
  @formats = FormatSearcher.new(@config).run
end