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.



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

def initialize(arel_table)
  @arel_table = arel_table
end

Instance Attribute Details

#arel_tableObject (readonly)

Returns the value of attribute arel_table.



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

def arel_table
  @arel_table
end

Instance Method Details

#eql?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


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

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

#hashObject



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

def hash
  equality_fields.hash
end