Class: Hecks::Adapters::SQLDatabase::Commands::Update::LinkToReferences
- Inherits:
-
Object
- Object
- Hecks::Adapters::SQLDatabase::Commands::Update::LinkToReferences
- Defined in:
- lib/commands/update/link_to_references.rb
Instance Attribute Summary collapse
-
#reference_ids ⇒ Object
readonly
Returns the value of attribute reference_ids.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(reference:, table:, reference_ids:, attributes:, id:) ⇒ LinkToReferences
constructor
A new instance of LinkToReferences.
Constructor Details
#initialize(reference:, table:, reference_ids:, attributes:, id:) ⇒ LinkToReferences
Returns a new instance of LinkToReferences.
8 9 10 11 12 13 14 15 16 |
# File 'lib/commands/update/link_to_references.rb', line 8 def initialize(reference:, table:, reference_ids:, attributes:, id:) @reference = reference @reference_ids = reference_ids @table = table @attributes = attributes @column = Column.factory(@reference) @record = {} @id = id end |
Instance Attribute Details
#reference_ids ⇒ Object (readonly)
Returns the value of attribute reference_ids.
7 8 9 |
# File 'lib/commands/update/link_to_references.rb', line 7 def reference_ids @reference_ids end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'lib/commands/update/link_to_references.rb', line 18 def call make_linking_records make_foreign_keys self end |