Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/setup.rb,
lib/sequel/lib/sequel/extensions/blank.rb,
lib/sequel/lib/sequel/extensions/sql_expr.rb
Instance Method Summary collapse
-
#blank? ⇒ Boolean
Objects are blank if they respond true to empty?.
-
#sql_expr ⇒ Object
Return a copy of the object wrapped in a Sequel::SQL::GenericComplexExpression.
- #try(method, *args, &block) ⇒ Object
Instance Method Details
#blank? ⇒ Boolean
Objects are blank if they respond true to empty?
12 13 14 |
# File 'lib/sequel/lib/sequel/extensions/blank.rb', line 12 def blank? respond_to?(:empty?) && empty? end |
#sql_expr ⇒ Object
Return a copy of the object wrapped in a Sequel::SQL::GenericComplexExpression. Allows easy use of the Object with Sequel's DSL. You'll probably have to make sure that Sequel knows how to literalize the object properly, though.
41 42 43 |
# File 'lib/sequel/lib/sequel/extensions/sql_expr.rb', line 41 def sql_expr Sequel::SQL::GenericComplexExpression.new(:NOOP, self) end |
#try(method, *args, &block) ⇒ Object
9 10 11 |
# File 'lib/setup.rb', line 9 def try(method, *args, &block) send(method, *args, &block) end |