Class: Hecks::Adapters::SQLDatabase::Commands::Update::CreateNewValue

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/update/create_new_value.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reference:, attributes:, reference_ids:) ⇒ CreateNewValue

Returns a new instance of CreateNewValue.



9
10
11
12
13
14
15
# File 'lib/commands/update/create_new_value.rb', line 9

def initialize(reference:, attributes:, reference_ids:)
  @reference = reference
  @attributes = attributes
  @reference_ids = {}
  @column = Column.factory(reference)
  @column_name = @column.name.to_sym
end

Instance Attribute Details

#reference_idsObject (readonly)

Returns the value of attribute reference_ids.



7
8
9
# File 'lib/commands/update/create_new_value.rb', line 7

def reference_ids
  @reference_ids
end

Instance Method Details

#callObject



17
18
19
20
21
# File 'lib/commands/update/create_new_value.rb', line 17

def call
  create_values
  create_value
  self
end