Method: Fast::SQL::Node#replace
- Defined in:
- lib/fast/sql.rb
#replace(pattern, with = nil, &replacement) ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'lib/fast/sql.rb', line 89 def replace(pattern, with=nil, &replacement) replacement ||= -> (n) { replace(n.loc.expression, with) } if root? SQL.replace(pattern, self, &replacement) else parent.replace(pattern, &replacement) end end |