Class: MultiTenant::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord-multi-tenant/query_rewriter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arel_table) ⇒ Table

Returns a new instance of Table.



9
10
11
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 9

def initialize(arel_table)
  @arel_table = arel_table
end

Instance Attribute Details

#arel_tableObject (readonly)

Returns the value of attribute arel_table.



7
8
9
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 7

def arel_table
  @arel_table
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 13

def eql?(other)
  self.class == other.class &&
    equality_fields.eql?(other.equality_fields)
end

#hashObject



18
19
20
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 18

def hash
  equality_fields.hash
end