Class: ActiveRecord::Associations::JoinDependency::JoinBase

Inherits:
JoinPart
  • Object
show all
Defined in:
activerecord/lib/active_record/associations/join_dependency/join_base.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Attributes inherited from JoinPart

#base_klass, #children

Instance Method Summary collapse

Methods inherited from JoinPart

#each, #each_children, #extract_record, #instantiate

Methods included from Enumerable

#as_json

Constructor Details

#initialize(base_klass, table, children) ⇒ JoinBase

Returns a new instance of JoinBase.



11
12
13
14
# File 'activerecord/lib/active_record/associations/join_dependency/join_base.rb', line 11

def initialize(base_klass, table, children)
  super(base_klass, children)
  @table = table
end

Instance Attribute Details

#tableObject (readonly)

Returns the value of attribute table



9
10
11
# File 'activerecord/lib/active_record/associations/join_dependency/join_base.rb', line 9

def table
  @table
end

Instance Method Details

#match?(other) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
# File 'activerecord/lib/active_record/associations/join_dependency/join_base.rb', line 16

def match?(other)
  return true if self == other
  super && base_klass == other.base_klass
end