Sha256: 172f0c1fecd16cb6ab82a8b48dd58c86b3562829a2212f38b354e06fe55e3835

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

module Columns

  # This class is responsible of removing a possible schema info
  # from a ruby model file. Note that it isn't any attempt to actually
  # check if we really deals with a model.
  class ModelCleaner

    # Public: Removes schema info.
    #
    # file_path - An absolute String file name.
    #
    # Returns nothing.
    def self.clean(file_path)
      %x( sed -i -e '/# == Schema Info/,$d' #{file_path}  > /dev/null 2>&1 )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
columns-0.1.0 lib/columns/model_cleaner.rb