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.



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

def initialize(arel_table)
  @arel_table = arel_table
end

Instance Attribute Details

#arel_tableObject (readonly)

Returns the value of attribute arel_table.



5
6
7
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 5

def arel_table
  @arel_table
end

Instance Method Details

#eql?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#hashObject



16
17
18
# File 'lib/activerecord-multi-tenant/query_rewriter.rb', line 16

def hash
  equality_fields.hash
end