class Ryakuzu::TableService
Attributes
new_table[RW]
old_table[RW]
Public Class Methods
new(old_table, new_table)
click to toggle source
# File lib/ryakuzu/services/table_service.rb, line 5 def initialize(old_table, new_table) @old_table = old_table @new_table = new_table end
Public Instance Methods
call()
click to toggle source
# File lib/ryakuzu/services/table_service.rb, line 10 def call text = text_migration Ryakuzu::RunMigration.new(old_table: old_table, new_table: new_table.tableize).call(new_table.tableize, text, 'table') end
text_migration()
click to toggle source
# File lib/ryakuzu/services/table_service.rb, line 15 def text_migration "rename_table :#{old_table}, :#{new_table.tableize}" end