Class: ROM::SQL::Migration::Recorder Private
- Inherits:
-
Object
- Object
- ROM::SQL::Migration::Recorder
- Defined in:
- lib/rom/sql/migration/recorder.rb
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.
Instance Attribute Summary collapse
- #operations ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize ⇒ Recorder
constructor
private
A new instance of Recorder.
Constructor Details
#initialize ⇒ Recorder
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.
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.
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
#operations ⇒ Object (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.
8 9 10 |
# File 'lib/rom/sql/migration/recorder.rb', line 8 def operations @operations end |