Class: NilClass

Inherits:
Object show all
Defined in:
lib/sequel/extensions/blank.rb,
lib/sequel/extensions/sql_expr.rb

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

nil is always blank

Returns:

  • (Boolean)


19
20
21
# File 'lib/sequel/extensions/blank.rb', line 19

def blank?
  true
end

#sql_exprObject

Returns a copy of the object wrapped in a Sequel::SQL::BooleanExpression, allowing easy use of Sequel’s DSL:

~nil.sql_expr  # NOT NULL


63
64
65
# File 'lib/sequel/extensions/sql_expr.rb', line 63

def sql_expr
  Sequel::SQL::BooleanExpression.new(:NOOP, self)
end