Module: Torque::PostgreSQL::Reflection

Included in:
ActiveRecord, Torque::PostgreSQL
Defined in:
lib/torque/postgresql/reflection.rb,
lib/torque/postgresql/reflection/runtime_reflection.rb,
lib/torque/postgresql/reflection/through_reflection.rb,
lib/torque/postgresql/reflection/abstract_reflection.rb,
lib/torque/postgresql/reflection/has_many_reflection.rb,
lib/torque/postgresql/reflection/association_reflection.rb,
lib/torque/postgresql/reflection/belongs_to_many_reflection.rb,
sig/torque/postgresql/reflection.rbs,
sig/torque/postgresql/reflection/runtime_reflection.rbs,
sig/torque/postgresql/reflection/through_reflection.rbs,
sig/torque/postgresql/reflection/abstract_reflection.rbs,
sig/torque/postgresql/reflection/has_many_reflection.rbs,
sig/torque/postgresql/reflection/association_reflection.rbs,
sig/torque/postgresql/reflection/belongs_to_many_reflection.rbs

Defined Under Namespace

Modules: AbstractReflection, AssociationReflection, HasManyReflection, RuntimeReflection, ThroughReflection Classes: BelongsToManyReflection

Instance Method Summary collapse

Instance Method Details

#create(macro, name, scope, options, ar) ⇒ reflection?

Parameters:

  • macro (Symbol)
  • name (Symbol)
  • scope (Proc, nil)
  • options (Hash[Symbol, untyped])
  • ar (model)

Returns:

  • (reflection, nil)


14
15
16
17
# File 'lib/torque/postgresql/reflection.rb', line 14

def create(macro, name, scope, options, ar)
  return super unless macro.eql?(:belongs_to_many)
  BelongsToManyReflection.new(name, scope, options, ar)
end