Class: ODDB::MergeCommand

Inherits:
Object show all
Defined in:
src/command/merge.rb

Instance Method Summary (collapse)

Constructor Details

- (MergeCommand) initialize(source_pointer, target_pointer)

A new instance of MergeCommand



6
7
8
# File 'src/command/merge.rb', line 6

def initialize(source_pointer, target_pointer)
  @source_pointer, @target_pointer = source_pointer, target_pointer
end

Instance Method Details

- (Object) execute(app)



9
10
11
12
13
14
15
16
# File 'src/command/merge.rb', line 9

def execute(app)
  source = @source_pointer.resolve(app)
  target = @target_pointer.resolve(app)
  target.merge(source)
  target.odba_store
  app.delete(@source_pointer)
  nil
end