Module: SchemaPlus::Functions::ActiveRecord::Migration::CommandRecorder
- Defined in:
- lib/schema_plus/functions/active_record/migration/command_recorder.rb
Instance Method Summary collapse
- #create_function(*args, &block) ⇒ Object
- #drop_function(*args, &block) ⇒ Object
- #invert_create_function(args) ⇒ Object
Instance Method Details
#create_function(*args, &block) ⇒ Object
7 8 9 |
# File 'lib/schema_plus/functions/active_record/migration/command_recorder.rb', line 7 def create_function(*args, &block) record(:create_function, args, &block) end |
#drop_function(*args, &block) ⇒ Object
11 12 13 |
# File 'lib/schema_plus/functions/active_record/migration/command_recorder.rb', line 11 def drop_function(*args, &block) record(:drop_function, args, &block) end |
#invert_create_function(args) ⇒ Object
15 16 17 18 19 |
# File 'lib/schema_plus/functions/active_record/migration/command_recorder.rb', line 15 def invert_create_function(args) = {} [:function_type] = args[3][:function_type] if args[3].has_key?(:function_type) [:drop_function, [args.first, args.second, ]] end |