Module: Sequel::DuplicateColumnsHandler
- Defined in:
- lib/sequel/extensions/duplicate_columns_handler.rb
Constant Summary collapse
- CALLER_ARGS =
:nocov:
(RUBY_VERSION >= '2.0' ? [0,1] : [0]).freeze
Instance Method Summary collapse
-
#on_duplicate_columns(handler = (yield); nil), &block) ⇒ Object
Customize handling of duplicate columns for this dataset.
Instance Method Details
#on_duplicate_columns(handler = (yield); nil), &block) ⇒ Object
Customize handling of duplicate columns for this dataset.
48 49 50 51 |
# File 'lib/sequel/extensions/duplicate_columns_handler.rb', line 48 def on_duplicate_columns(handler = (raise Error, "Must provide either an argument or a block to on_duplicate_columns" unless defined?(yield); nil), &block) raise Error, "Cannot provide both an argument and a block to on_duplicate_columns" if handler && block clone(:on_duplicate_columns=>handler||block) end |