Method: Regexp::Template#render_atom
- Defined in:
- lib/core_ext/regexp.rb
#render_atom(atom) ⇒ Object
276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/core_ext/regexp.rb', line 276 def render_atom(atom) if(atom.is_a? Array) atom = atom.map(&:to_s).join('') end atom_str = atom.to_s if(atom_str.include?("literal_")) return self.escape(atom_str.split("_").last) else return atom_str end end |