# module Sass::Rails::SassImporter::Deprecated

### Public Instance Methods

extensions() click to toggle source
Calls superclass method

    # File lib/sass/rails/importer.rb, line 100
    def extensions
      {
        'css.scss'     => :scss,
        'css.sass'     => :sass,
        'css.scss.erb' => :scss_erb,
        'css.sass.erb' => :sass_erb
      }.merge(super)
    end

find(*args) click to toggle source
Calls superclass method

    # File lib/sass/rails/importer.rb, line 113
    def find(*args)
      deprecate_extra_css_extension(super)
    end

find_relative(*args) click to toggle source
Calls superclass method

    # File lib/sass/rails/importer.rb, line 109
    def find_relative(*args)
      deprecate_extra_css_extension(super)
    end

### Private Instance Methods

deprecate_extra_css_extension(engine) click to toggle source

    # File lib/sass/rails/importer.rb, line 118
    def deprecate_extra_css_extension(engine)
      if engine && filename = engine.options[:filename]
        if filename.end_with?('.css.scss')
          msg = "Extra .css in SCSS file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss', '.scss')}."
        elsif filename.end_with?('.css.sass')
          msg = "Extra .css in SASS file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass', '.sass')}."
        elsif filename.end_with?('.css.scss.erb')
          msg = "Extra .css in SCSS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.scss.erb', '.scss.erb')}."
        elsif filename.end_with?('.css.sass.erb')
          msg = "Extra .css in SASS/ERB file is unnecessary. Rename #{filename} to #{filename.sub('.css.sass.erb', '.sass.erb')}."
        end

        ActiveSupport::Deprecation.warn(msg) if msg
      end

      engine
    end