Class: ROM::SQL::Migration::Recorder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rom/sql/migration/recorder.rb

Overview

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

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRecorder

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.

Returns a new instance of Recorder.

API:

  • private



10
11
12
13
14
# File 'lib/rom/sql/migration/recorder.rb', line 10

def initialize(&)
  @operations = []

  instance_exec(&) if block_given?
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args) ⇒ Object (private)

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.

API:

  • private



22
23
24
25
# File 'lib/rom/sql/migration/recorder.rb', line 22

def method_missing(m, *args, &)
  nested = block_given? ? Recorder.new(&).operations : EMPTY_ARRAY
  @operations << [m, args, nested]
end

Instance Attribute Details

#operationsObject (readonly)

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.

API:

  • private



8
9
10
# File 'lib/rom/sql/migration/recorder.rb', line 8

def operations
  @operations
end