Method: EachSQL#each
- Defined in:
- lib/each_sql/each_sql.rb
#each {|String| ... } ⇒ NilClass
Parses the buffer and enumerates through the executable blocks.
70 71 72 73 74 75 76 77 78 |
# File 'lib/each_sql/each_sql.rb', line 70 def each result = shift sqls = (result[:sqls] + result[:leftover]). map { |sql| strip_sql(sql) }. reject(&:empty?) sqls.each do |sql| yield sql end end |