### Home Classes Methods

### In Files

- lib/compass/exec/project_options_parser.rb

### Methods

- #set_dir_or_path
- #set_options
- #set_project_options

### Class/Module Index

Quicksearch

- Compass
- Compass::Actions
- Compass::AppIntegration
- Compass::AppIntegration::Helpers
- Compass::AppIntegration::Rails
- Compass::AppIntegration::StandAlone
- Compass::AppIntegration::StandAlone::ConfigurationDefaults
- Compass::AppIntegration::StandAlone::Installer
- Compass::BrowserSupport
- Compass::Commands
- Compass::Commands::Base
- Compass::Commands::CleanProject
- Compass::Commands::CleanProjectOptionsParser
- Compass::Commands::CompileProjectOptionsParser
- Compass::Commands::ConfigurationOptionsParser
- Compass::Commands::CreateProject
- Compass::Commands::CreateProjectOptionsParser
- Compass::Commands::Default
- Compass::Commands::DefaultOptionsParser
- Compass::Commands::ExtensionCommand
- Compass::Commands::ExtensionOptionsParser
- Compass::Commands::ExtensionsOptionParser
- Compass::Commands::GenerateGridBackground
- Compass::Commands::GridBackgroundOptionsParser
- Compass::Commands::Help
- Compass::Commands::HelpOptionsParser
- Compass::Commands::Imports
- Compass::Commands::InstallerCommand
- Compass::Commands::Interactive
- Compass::Commands::InteractiveOptionsParser
- Compass::Commands::ListFrameworks
- Compass::Commands::MemoryDebugger
- Compass::Commands::PrintVersion
- Compass::Commands::ProjectBase
- Compass::Commands::ProjectStats
- Compass::Commands::Registry
- Compass::Commands::Sprite
- Compass::Commands::SpriteOptionsParser
- Compass::Commands::StampPattern
- Compass::Commands::StampPatternOptionsParser
- Compass::Commands::StatsOptionsParser
- Compass::Commands::StructureOptionsParser
- Compass::Commands::UnpackExtension
- Compass::Commands::UpdateProject
- Compass::Commands::ValidateProject
- Compass::Commands::ValidationOptionsParser
- Compass::Commands::VersionOptionsParser
- Compass::Commands::WatchProject
- Compass::Commands::WatchProjectOptionsParser
- Compass::Commands::WriteConfiguration
- Compass::Compiler
- Compass::Configuration
- Compass::Configuration::Adapters
- Compass::Configuration::Comments
- Compass::Configuration::Data
- Compass::Configuration::Defaults
- Compass::Configuration::FileData
- Compass::Configuration::Helpers
- Compass::Configuration::Inheritance
- Compass::Configuration::Inheritance::ClassMethods
- Compass::Configuration::Inheritance::ClassMethods::ArrayProxy
- Compass::Configuration::Inheritance::InstanceMethods
- Compass::Configuration::Paths
- Compass::Configuration::Serialization
- Compass::Error
- Compass::Exec
- Compass::Exec::CommandOptionParser
- Compass::Exec::GlobalOptionsParser
- Compass::Exec::Helpers
- Compass::Exec::ProjectOptionsParser
- Compass::Exec::SubCommandUI
- Compass::Exec::SwitchUI
- Compass::FilesystemConflict
- Compass::Frameworks
- Compass::Frameworks::Framework
- Compass::GridBuilder
- Compass::Installers
- Compass::Installers::BareInstaller
- Compass::Installers::Base
- Compass::Installers::Manifest
- Compass::Installers::Manifest::Entry
- Compass::Installers::ManifestInstaller
- Compass::Installers::TemplateContext
- Compass::Logger
- Compass::MissingDependency
- Compass::NullLogger
- Compass::PNG
- Compass::SassExtensions
- Compass::SassExtensions::Functions
- Compass::SassExtensions::Functions::Colors
- Compass::SassExtensions::Functions::Constants
- Compass::SassExtensions::Functions::CrossBrowserSupport
- Compass::SassExtensions::Functions::CrossBrowserSupport::CSS2FallbackValue
- Compass::SassExtensions::Functions::Display
- Compass::SassExtensions::Functions::Enumerate
- Compass::SassExtensions::Functions::Env
- Compass::SassExtensions::Functions::FontFiles
- Compass::SassExtensions::Functions::GradientSupport
- Compass::SassExtensions::Functions::GradientSupport::Assertions
- Compass::SassExtensions::Functions::GradientSupport::ColorStop
- Compass::SassExtensions::Functions::GradientSupport::Functions
- Compass::SassExtensions::Functions::GradientSupport::Gradient
- Compass::SassExtensions::Functions::GradientSupport::Gradient::ClassMethods
- Compass::SassExtensions::Functions::GradientSupport::LinearGradient
- Compass::SassExtensions::Functions::GradientSupport::RadialGradient
- Compass::SassExtensions::Functions::ImageSize
- Compass::SassExtensions::Functions::ImageSize::ImageProperties
- Compass::SassExtensions::Functions::ImageSize::JPEG
- Compass::SassExtensions::Functions::InlineImage
- Compass::SassExtensions::Functions::Lists
- Compass::SassExtensions::Functions::Math
- Compass::SassExtensions::Functions::Selectors
- Compass::SassExtensions::Functions::Sprites
- Compass::SassExtensions::Functions::Sprites::VariableReader
- Compass::SassExtensions::Functions::Urls
- Compass::SassExtensions::Functions::Urls::FontUrl
- Compass::SassExtensions::Functions::Urls::GeneratedImageUrl
- Compass::SassExtensions::Functions::Urls::ImageUrl
- Compass::SassExtensions::Functions::Urls::StylesheetUrl
- Compass::SassExtensions::Sprites
- Compass::SassExtensions::Sprites::ChunkyPngEngine
- Compass::SassExtensions::Sprites::Engine
- Compass::SassExtensions::Sprites::Image
- Compass::SassExtensions::Sprites::ImageMethods
- Compass::SassExtensions::Sprites::ImageRow
- Compass::SassExtensions::Sprites::LayoutMethods
- Compass::SassExtensions::Sprites::RowFitter
- Compass::SassExtensions::Sprites::SpriteMap
- Compass::SassExtensions::Sprites::SpriteMethods
- Compass::SpriteException
- Compass::SpriteImporter
- Compass::Sprites
- Compass::Sprites::Binding
- Compass::Stats
- Compass::Stats::CssFile
- Compass::Stats::SassFile
- Compass::Stats::StatsVisitor
- Compass::TestCase
- Compass::Util
- Compass::Version
- Sass
- Sass::Script
- Sass::Script::CrossBrowserFunctionCall
- Sass::Script::Funcall
- Sass::Script::Functions
- Sass::Script::Functions::EvaluationContext
- Sass::Script::HasSimpleCrossBrowserFunctionSupport
- Sass::Script::List
- Sass::Tree
- Sass::Tree::Node
- QuickCache

No matching classes.

# Compass::Exec::ProjectOptionsParser

### Public Instance Methods

set_dir_or_path(type, dir) click to toggle source

    # File lib/compass/exec/project_options_parser.rb, line 6
    def set_dir_or_path(type, dir)
      if Pathname.new(dir).absolute?
        self.options[:"#{type}_path"] = dir.tr('\','/')
      else
        self.options[:"#{type}_dir"] = dir.tr('\','/')
      end
    end

set_options(opts) click to toggle source

    # File lib/compass/exec/project_options_parser.rb, line 2
    def set_options(opts)
      super
      set_project_options(opts)
    end

set_project_options(opts) click to toggle source

    # File lib/compass/exec/project_options_parser.rb, line 14
    def set_project_options(opts)
      opts.on('-c', '--config CONFIG_FILE', 'Specify the location of the configuration file explicitly.') do |configuration_file|
        self.options[:configuration_file] = configuration_file
      end

      opts.on('--app APP', 'Tell compass what kind of application it is integrating with. E.g. rails') do |project_type|
        self.options[:project_type] = project_type.to_sym
      end

      opts.on('--sass-dir SRC_DIR', "The source directory where you keep your sass stylesheets.") do |sass_dir|
        set_dir_or_path(:sass, sass_dir)
      end

      opts.on('--css-dir CSS_DIR', "The target directory where you keep your css stylesheets.") do |css_dir|
        set_dir_or_path(:css, css_dir)
      end

      opts.on('--images-dir IMAGES_DIR', "The directory where you keep your images.") do |images_dir|
        set_dir_or_path(:images, images_dir)
      end

      opts.on('--javascripts-dir JS_DIR', "The directory where you keep your javascripts.") do |javascripts_dir|
        set_dir_or_path(:javascripts, javascripts_dir)
      end

      opts.on('--fonts-dir FONTS_DIR', "The directory where you keep your fonts.") do |fonts_dir|
        set_dir_or_path(:fonts, fonts_dir)
      end

      opts.on('-e ENV', '--environment ENV', [:development, :production], 'Use sensible defaults for your current environment.',
              '  One of: development (default), production') do |env|
        self.options[:environment] = env
      end

      opts.on('-s STYLE', '--output-style STYLE', [:nested, :expanded, :compact, :compressed], 'Select a CSS output mode.',
              '  One of: nested, expanded, compact, compressed') do |style|
        self.options[:output_style] = style
      end

      opts.on('--relative-assets', :NONE, 'Make compass asset helpers generate relative urls to assets.') do
        self.options[:relative_assets] = true
      end

      opts.on('--no-line-comments', :NONE, 'Disable line comments.') do
        self.options[:line_comments] = false
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.