Class: Nydp::Builtin::StringReplace
- Includes:
- Base, Singleton
- Defined in:
- lib/nydp/builtin/string_replace.rb
Instance Method Summary collapse
Methods included from Base
#call, #handle_error, ignore_errors, #inspect, #name, #nydp_type, #to_s
Methods included from Helper
#cons, #list, #literal?, #pair?, #sig, #sym, #sym?
Methods included from Converter
Instance Method Details
#builtin_call(remove, insert, str) ⇒ Object
4 5 6 |
# File 'lib/nydp/builtin/string_replace.rb', line 4 def builtin_call remove, insert, str str.to_s.to_s.gsub Regexp.new(remove.to_ruby), insert.to_ruby end |