lib/sycsvpro/filter.rb
def method_missing(id, *args, &block)
      boolean_row_regex = %r{
        BEGIN(\(*[nsd]\d+[<!=~>]{1,2}
         (?:[A-Z][A-Za-z]*\.new\(.*?\)|\d+|['"].*?['"])
         (?:\)*(?:&&|\|\||$)
         \(*[nsd]\d+[<!=~>]{1,2}
         (?:[A-Z][A-Za-z]*\.new\(.*?\)|\d+|['"].*?['"])\)*)*)END
      }xi

      return boolean_row($1, args, block)          if id =~ boolean_row_regex
      return equal($1, args, block)                if id =~ /^(\d+)$/
      return equal_type($1, $2, args, block)       if id =~ /^(s|n|d):(\d+)$/
      return range($1, $2, args, block)            if id =~ /^(\d+)-(\d+)$/
      return range_type($1, $2, $3, args, block)   if id =~ /^(s|n|d):(\d+)-(\d+)$/
      return regex($1, args, block)                if id =~ /^\/(.*)\/$/
      return col_regex($1, $2, args, block)        if id =~ /^(\d+):\/(.*)\/$/
      return date($1, $2, $3, args, block)         if id =~ /^(\d+):(<|=|>)(\d+.\d+.\d+)$/
      return date_range($1, $2, $3, args, block)   if id =~ /^(\d+):(\d+.\d+.\d+.)-(\d+.\d+.\d+)$/
      return number($1, $2, $3, args, block)       if id =~ /^(\d+):(<|=|>)(\d+)$/
      return number_range($1, $2, $3, args, block) if id =~ /^(\d):(\d+)-(\d+)$/

      super
    end
def method_missing(id, *args, &block)
      boolean_row_regex = %r{
        BEGIN(\(*[nsd]\d+[<!=~>]{1,2}
         (?:[A-Z][A-Za-z]*\.new\(.*?\)|\d+|['"].*?['"])
         (?:\)*(?:&&|\|\||$)
         \(*[nsd]\d+[<!=~>]{1,2}
         (?:[A-Z][A-Za-z]*\.new\(.*?\)|\d+|['"].*?['"])\)*)*)END
      }xi

      return boolean_row($1, args, block)          if id =~ boolean_row_regex
      return equal($1, args, block)                if id =~ /^(\d+)$/
      return equal_type($1, $2, args, block)       if id =~ /^(s|n|d):(\d+)$/
      return range($1, $2, args, block)            if id =~ /^(\d+)-(\d+)$/
      return range_type($1, $2, $3, args, block)   if id =~ /^(s|n|d):(\d+)-(\d+)$/
      return regex($1, args, block)                if id =~ /^\/(.*)\/$/
      return col_regex($1, $2, args, block)        if id =~ /^(\d+):\/(.*)\/$/
      return date($1, $2, $3, args, block)         if id =~ /^(\d+):(<|=|>)(\d+.\d+.\d+)$/
      return date_range($1, $2, $3, args, block)   if id =~ /^(\d+):(\d+.\d+.\d+.)-(\d+.\d+.\d+)$/
      return number($1, $2, $3, args, block)       if id =~ /^(\d+):(<|=|>)(\d+)$/
      return number_range($1, $2, $3, args, block) if id =~ /^(\d):(\d+)-(\d+)$/

      super
    end
def method_missing ( id , * args , & block ) boolean_row_regex = %r{ \( \d \. \( \) \d \) \| \| \( \d \. \( \) \d \) }xi return boolean_row ( $1 , args , block ) if id =~ boolean_row_regex return equal ( $1 , args , block ) if id =~ / \d / return equal_type ( $1 , $2 , args , block ) if id =~ / \d / return range ( $1 , $2 , args , block ) if id =~ / \d \d / return range_type ( $1 , $2 , $3 , args , block ) if id =~ / \d \d / return regex ( $1 , args , block ) if id =~ / \/ \/ / return col_regex ( $1 , $2 , args , block ) if id =~ / \d \/ \/ / return date ( $1 , $2 , $3 , args , block ) if id =~ / \d \d \d \d / return date_range ( $1 , $2 , $3 , args , block ) if id =~ / \d \d \d \d \d \d \d / return number ( $1 , $2 , $3 , args , block ) if id =~ / \d \d / return number_range ( $1 , $2 , $3 , args , block ) if id =~ / \d \d \d / super end
Creates a new filter
 Creates the filters based on the given patterns
Creates a new filter Creates the filters based on the given patterns