module Philter::Base

It contains generic methods

Private Instance Methods

philter_help() click to toggle source

Show tips on usage

# File lib/philter/base.rb, line 8
    def philter_help
      <<-HELP.gsub(/^      /, '')
      *************************************************************************
      Philter version #{Philter.version}
      [].philter 'search', {options}
      Examples:
      [1,2,3].philter 1 => [1]
      [1,2,3].philter [2,3] => [2, 3]
      [{id: 1, name: 'Mark'},{id: 2, name: 'Bill'}].philter id: 1
      Articles.philter id: 1
      People.philter   name: 'Mario'
      People.philter   email: /\A.+@gmail/
      Use option get: to select an attribute
      People.philter   {id: 1}, get: :surname
      Use option debug: to watch the selection
      Articles.philter {id: 1}, debug: true
      *************************************************************************
      HELP
    end