Module: Dyna::Filterable

Included in:
Client, Exporter
Defined in:
lib/dyna/filterable.rb

Instance Method Summary collapse

Instance Method Details

#should_skip(table_name) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/dyna/filterable.rb', line 3

def should_skip(table_name)
  if @options.table_names
    unless @options.table_names.include?(table_name)
      log(:debug, "skip table(with tables_names option) #{table_name}", false)
      return true
    end
  end

  if @options.exclude_table_names
    if @options.exclude_table_names.any? {|regex| table_name =~ regex}
      log(:debug, "skip table(with exclude_tables_names option) #{table_name}", false)
      return true
    end
  end

  false
end