lib/spreadsheet_agent/runner.rb
def only_pages_if(&include_code)
      @only_pages = @db.worksheets.collect{ |p| p.title }.select { |ptitle| include_code.call(ptitle) }
      self
    end
def only_pages_if(&include_code)
      @only_pages = @db.worksheets.collect{ |p| p.title }.select { |ptitle| include_code.call(ptitle) }
      self
    end
def only_pages_if ( & include_code ) @only_pages = @db . worksheets . collect { | p | p . title } . select { | ptitle | include_code . call ( ptitle ) } self end
Provide a PROC desinged to intelligently determine pages to process. If not called, all pages
 not affected by the :skip_pages, or :only_pages constructor params, or a previous call to
 skip_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 include 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.

   include only pages whose title begins with 'foo'
   runner.only_pages_if {|title| title.match(/^foo/)}.process!

   Same, but without calling process so that skip_entry or skip_goal can be called on the runner
   runner.only_pages_if do |title|
     title.match(/^foo/)
   end
   ... can call skip_entry, skip_goal
   runner.process!
Provide a PROC desinged to intelligently determine pages to process . If not called all pages not affected by the : skip_pages or : only_pages constructor params or a previous call to skip_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 include 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 .