Class: TableWarnings::Null

Inherits:
Exclusive show all
Defined in:
lib/table_warnings/null.rb

Instance Attribute Summary

Attributes inherited from Exclusive

#conditions, #scout, #table

Instance Method Summary collapse

Methods inherited from Exclusive

#covers, #exclusives, #initialize, #matches, #messages

Constructor Details

This class inherits a constructor from TableWarnings::Exclusive

Instance Method Details

#message(column) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/table_warnings/null.rb', line 3

def message(column)
  if column.nulls?(conditions)
    if conditions.empty?
      "There are NULLs in the #{column.name.inspect} column."
    else
      "There are NULLs with the conditions #{conditions.inspect} in the #{column.name.inspect} column."
    end
  end
end