Class/Module Index [+]

Quicksearch

Compass::Commands::CleanProject

Public Class Methods

description(command) click to toggle source
# File lib/compass/commands/clean_project.rb, line 56
def description(command)
  "Remove generated files and the sass cache"
end
new(working_path, options) click to toggle source
# File lib/compass/commands/clean_project.rb, line 25
def initialize(working_path, options)
  super
  assert_project_directory_exists!
end
option_parser(arguments) click to toggle source
# File lib/compass/commands/clean_project.rb, line 43
def option_parser(arguments)
  parser = Compass::Exec::CommandOptionParser.new(arguments)
  parser.extend(Compass::Exec::GlobalOptionsParser)
  parser.extend(Compass::Exec::ProjectOptionsParser)
  parser.extend(CleanProjectOptionsParser)
end
parse!(arguments) click to toggle source
# File lib/compass/commands/clean_project.rb, line 60
def parse!(arguments)
  parser = option_parser(arguments)
  parser.parse!
  parse_arguments!(parser, arguments)
  parser.options
end
parse_arguments!(parser, arguments) click to toggle source
# File lib/compass/commands/clean_project.rb, line 67
def parse_arguments!(parser, arguments)
  if arguments.size > 0
    parser.options[:project_name] = arguments.shift if File.directory?(arguments.first)
    unless arguments.empty?
      parser.options[:sass_files] = arguments.dup
      parser.options[:force] = true
    end
  end
end
primary() click to toggle source
# File lib/compass/commands/clean_project.rb, line 54
def primary; true; end
usage() click to toggle source
# File lib/compass/commands/clean_project.rb, line 50
def usage
  option_parser([]).to_s
end

Public Instance Methods

determine_cache_location() click to toggle source
# File lib/compass/commands/clean_project.rb, line 38
def determine_cache_location
  Compass.configuration.cache_path || Sass::Plugin.options[:cache_location] || File.join(working_path, ".sass-cache")
end
perform() click to toggle source
# File lib/compass/commands/clean_project.rb, line 30
def perform
  compiler = new_compiler_instance
  compiler.clean!
  Compass::SpriteImporter.find_all_sprite_map_files(Compass.configuration.generated_images_path).each do |sprite|
    remove sprite
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.