lib/mobility/backends/sequel/serialized/query_methods.rb in mobility-0.5.1 vs lib/mobility/backends/sequel/serialized/query_methods.rb in mobility-0.6.0

- old
+ new

@@ -1,19 +1,22 @@ # frozen_string_literal: true require "mobility/backends/sequel/query_methods" module Mobility module Backends - class Sequel::Serialized::QueryMethods < Sequel::QueryMethods - include Serialized + module Sequel + class Serialized::QueryMethods < QueryMethods + include Backends::Serialized - def initialize(attributes, _) - super - q = self + def initialize(attributes, _) + super + q = self - define_method :where do |*cond, &block| - q.check_opts(cond.first) || super(*cond, &block) + define_method :where do |*cond, &block| + q.check_opts(cond.first) || super(*cond, &block) + end end end + Serialized.private_constant :QueryMethods end end end