class Taxonifi::Splitter::Tokens::Pages

A token to match page ranges, with remainders noted.

Attributes

pg_end[R]
pg_start[R]
remainder[R]

Public Class Methods

new(str) click to toggle source
# File lib/splitter/tokens.rb, line 239
def initialize(str)
  str.strip 
  str =~ %r\A\s*(\d+)\s*[-]?\s*(\d+)?\)?\s*[\.\,]?(.*)?/
  @pg_start = $1 
  @pg_end = $2
  @remainder = $3
end