Skip to content

Commit

Permalink
Let private method be private
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Mar 1, 2024
1 parent f285538 commit 11b383b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/database_rewinder/multiple_statements_executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ def supports_multiple_statements?
%w(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter ActiveRecord::ConnectionAdapters::Mysql2Adapter ActiveRecord::ConnectionAdapters::SQLite3Adapter).include? self.class.name
end

def raw_connection_or_connection
defined?(@raw_connection) ? @raw_connection : @connection
end

def execute_multiple(sql)
#TODO Use ADAPTER_NAME when we've dropped AR 4.1 support
case self.class.name
Expand Down Expand Up @@ -49,6 +45,12 @@ def execute_multiple(sql)
raise 'Multiple deletion is not supported with the current database adapter.'
end
end

private

def raw_connection_or_connection
defined?(@raw_connection) ? @raw_connection : @connection
end
end
end
end

0 comments on commit 11b383b

Please sign in to comment.