Class: ReeString::Remove

Inherits:
Object
  • Object
show all
Includes:
Ree::FnDSL
Defined in:
lib/ree_lib/packages/ree_string/package/ree_string/functions/remove.rb

Instance Method Summary collapse

Instance Method Details

#call(str, patterns) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/ree_lib/packages/ree_string/package/ree_string/functions/remove.rb', line 13

def call(str, patterns)
  str = str.dup

  patterns.each do |pattern|
    str.gsub!(pattern, "")
  end

  str
end