class QB::Util::Decorators::NoPropsInKwds

Don't all {NRSER::Props} arguments in last position to become keyword options.

Since {NRSER::Props} objects can be subclasses of {Hash}, etc., they can erroneously end up being considered keyword options.

This decorator prevents that. If you want to pass an {NRSER::Props} as the keywords, calling `#to_h` or something on it first should work.

Public Instance Methods

call(target, receiver, *args, &block) click to toggle source
# File lib/qb/util/decorators.rb, line 90
def call target, receiver, *args, &block
  if args.last.is_a? NRSER::Props
    target.call *args, {}, &block
  else
    target.call *args, &block
  end
end