Module: ROM::SQL::Plugin::Associates Private

Defined in:
lib/rom/sql/plugin/associates.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Make a command that automaticaly sets FK attribute on input tuples

Defined Under Namespace

Modules: ClassMethods, InstanceMethods Classes: AssociateOptions

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/rom/sql/plugin/associates.rb', line 33

def self.included(klass)
  klass.class_eval do
    extend ClassMethods
    include InstanceMethods

    setting :associations, default: {}, reader: true

    option :associations, default: -> { self.class.associations }

    option :configured_associations, default: -> { EMPTY_ARRAY }
  end
  super
end