Created
July 13, 2018 06:46
-
-
Save kikeda1104/ba37bf1c2bde53d6ccd48ecffac8b4fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def call | |
@conn.exec(ERB.new(erb_template).result(binding)) | |
end | |
private | |
def post_initialize(args) | |
@conn = Database::Adapter.conn(args) | |
end | |
def erb_template | |
<<-SQL | |
<% TABLES.each do |table| %> | |
drop table <%= table %>_copy; | |
<% end %> | |
SQL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment