Class: Switchman::ActiveRecord::QueryMethods::NonTransposingValue

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/switchman/active_record/query_methods.rb

Overview

Use this class to prevent a value from getting transposed across shards

Instance Method Summary collapse

Instance Method Details

#classObject



8
9
10
# File 'lib/switchman/active_record/query_methods.rb', line 8

def class
  __getobj__.class
end

#is_a?(other) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
15
16
# File 'lib/switchman/active_record/query_methods.rb', line 12

def is_a?(other)
  return true if other == NonTransposingValue

  __getobj__.is_a?(other)
end