class ProjectEulerCli::ArchiveSearcher

Handles searching the problems

Attributes

results[R]

Array of IDs corresponding to the problems found in last search

searching[RW]

Tracks whether there is an active search

Public Class Methods

new() click to toggle source
# File lib/project_euler_cli/archive_searcher.rb, line 12
def initialize
  @results = []
  @searching = false
  @initial_search = true
end

Public Instance Methods

load_keywords() click to toggle source

Loads the problem numbers and titles for every page that is not loaded.

# File lib/project_euler_cli/archive_searcher.rb, line 19
def load_keywords
  puts "updating keywords..."

  0.upto(Page.total) { |page| load_page(page) }
end