class Compass::Commands::ValidateProject
Public Class Methods
new(working_path, options)
click to toggle source
Calls superclass method
Compass::Commands::ProjectBase.new
# File lib/compass/commands/validate_project.rb, line 26 def initialize(working_path, options) super assert_project_directory_exists! end
Public Instance Methods
description(command)
click to toggle source
# File lib/compass/commands/validate_project.rb, line 52 def description(command) "Validate your generated css." end
option_parser(arguments)
click to toggle source
# File lib/compass/commands/validate_project.rb, line 41 def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(ValidationOptionsParser) end
parse!(arguments)
click to toggle source
# File lib/compass/commands/validate_project.rb, line 56 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/validate_project.rb, line 63 def parse_arguments!(parser, arguments) if arguments.size == 1 parser.options[:project_name] = arguments.shift elsif arguments.size == 0 # default to the current directory. else raise Compass::Error, "Too many arguments were specified." end end
perform()
click to toggle source
# File lib/compass/commands/validate_project.rb, line 31 def perform require 'compass/validator' UpdateProject.new(working_path, options).perform Dir.chdir Compass.configuration.project_path do Validator.new(project_css_subdirectory).validate() end end
usage()
click to toggle source
# File lib/compass/commands/validate_project.rb, line 48 def usage option_parser([]).to_s end