Module: PgOnlineSchemaChange::Helper
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *_args) ⇒ Object
16
17
18
19
20
21
|
# File 'lib/pg_online_schema_change/helper.rb', line 16
def method_missing(method, *_args)
result = Store.send(:get, method)
return result if result
super
end
|
Instance Method Details
#primary_key ⇒ Object
5
6
7
8
9
10
|
# File 'lib/pg_online_schema_change/helper.rb', line 5
def primary_key
result = Store.get(:primary_key)
return result if result
Store.set(:primary_key, Query.primary_key_for(client, client.table_name))
end
|
#respond_to_missing?(method_name, *args) ⇒ Boolean
23
24
25
26
27
28
|
# File 'lib/pg_online_schema_change/helper.rb', line 23
def respond_to_missing?(method_name, *args)
result = Store.send(:get, method)
return true if result
super
end
|