lib/spreadsheet_agent/runner.rb
def skip_pages_if(&skip_code)
      @only_pages = @db.worksheets.collect{ |p| p.title }.reject{ |ptitle| skip_code.call(ptitle) }
      self
    end
def skip_pages_if(&skip_code)
      @only_pages = @db.worksheets.collect{ |p| p.title }.reject{ |ptitle| skip_code.call(ptitle) }
      self
    end
def skip_pages_if ( & skip_code ) @only_pages = @db . worksheets . collect { | p | p . title } . reject { | ptitle | skip_code . call ( ptitle ) } self end
Create a new SpreadsheetAgent::Runner.  Can be created with any of the following optional attributes:
 * :skip_pages - raises SpreadsheetAgentError if passed along with :only_pages
 * :only_pages - raises SpreadsheetAgentError if passed along with :skip_pages
 * :dry_run
 * :run_in_serial
 * :debug
 * :config_file (see SpreadsheetAgent::Db)
 * :sleep_between
 * :agent_bin

 Provide a PROC designed to intelligently filter out pages that are not to be processed.
 If not called, all pages not defined in :only_pages, or :skip_pages parameters in the constructor,
 or a previous call to only_pages_if will be processed.
 This will override only_pages, or skip_pages passed as arguments to the constructor, and
 any previous call to skip_pages_if, or only_pages_if.  The PROC should take the title of
 a page as a string, and return true if a process decides to skip the page, false otherwise.
 Must be called before the process! method to affect the pages it processes.  Returns the runner
 self to facilitate chained processing with skip_goal, skip_entry, and/or process! if desired.

   skip pages whose title contains 'skip'
   runner.skip_pages_if {|title| title.match(/skip/) }.process!

   Same, but without calling process so that skip_entry or skip_goal can be called on the runner
   runner.skip_pages_if do |title|
     title.match(/skip/)
   end
   ... can call skip_entry, skip_goal, etc
   runner.process!
Create a new SpreadsheetAgent :: Runner . Can be created with any of the following optional attributes : * : skip_pages - raises SpreadsheetAgentError if passed along with : only_pages * : only_pages - raises SpreadsheetAgentError if passed along with : skip_pages * : dry_run * : run_in_serial * : debug * : config_file ( see SpreadsheetAgent :: Db ) * : sleep_between * : agent_bin