Module: FileMutate::RemoveContent::ClassMethods

Defined in:
lib/file_mutate/remove_content.rb

Instance Method Summary collapse

Instance Method Details

#remove_content_from(file_name, options = {}, &block) ⇒ Object



26
27
28
# File 'lib/file_mutate/remove_content.rb', line 26

def remove_content_from file_name, options = {}, &block
  replace_content_from file_name, options.merge(:with => ''), &block
end

#remove_from(file_name, content = nil, &block) ⇒ Object



21
22
23
24
# File 'lib/file_mutate/remove_content.rb', line 21

def remove_from file_name, content=nil, &block
  content ||= yield
  replace_content_from file_name, :content => content, :with => '', &block
end