def generate_css
      needs = affected_files.map { |m| File.extname(m)[1..-1].to_sym }
      
      original_ext = File.extname(@original_file)[1..-1]
      needs << original_ext.to_sym unless needs.include? original_ext

      WebifyRuby::Css.link_to = @link_to
    
      if should_write_css?
        WebifyRuby::Css.relative_from = @link_to ? nil : @css
      end
        
      css = WebifyRuby::Css.new(File.basename(@file, ".*"), @file, *needs)
      @styles = css.result

      @css_file = css.write @css if should_write_css?
    end
def generate_css
      needs = affected_files.map { |m| File.extname(m)[1..-1].to_sym }
      
      original_ext = File.extname(@original_file)[1..-1]
      needs << original_ext.to_sym unless needs.include? original_ext

      WebifyRuby::Css.link_to = @link_to
    
      if should_write_css?
        WebifyRuby::Css.relative_from = @link_to ? nil : @css
      end
        
      css = WebifyRuby::Css.new(File.basename(@file, ".*"), @file, *needs)
      @styles = css.result

      @css_file = css.write @css if should_write_css?
    end
Internal: Communicate with Css class and take care of stylesheet
 creation, code generation and distribution.
 Method generates Css if attribute is present and writes to a file
 if attribute possibly is a directory.

 Returns the CSS filepath, code written or nothing.