Sha256: a0b5cdcf7963b3d368bbed65a84ddaf835cf2090ee6590ab9a85431717685a4f

Contents?: true

Size: 1.29 KB

Versions: 108

Compression:

Stored size: 1.29 KB

Contents

require 'compass/commands/project_base'
require 'compass/commands/update_project'

module Compass
  module Commands
    module InteractiveOptionsParser
      def set_options(opts)
        opts.banner = %Q{
          Usage: compass interactive [path/to/project] [options]

          Description:
            Interactively evaluate SassScript

          Options:
        }.strip.split("\n").map{|l| l.gsub(/^ {0,10}/,'')}.join("\n")

        super
      end
    end
    class Interactive < ProjectBase

      register :interactive

      def initialize(working_path, options)
        super
      end

      def perform
        require 'sass/repl'
        Sass::Repl.new.run
      end

      class << self

        def option_parser(arguments)
          parser = Compass::Exec::CommandOptionParser.new(arguments)
          parser.extend(Compass::Exec::GlobalOptionsParser)
          parser.extend(Compass::Exec::ProjectOptionsParser)
          parser.extend(InteractiveOptionsParser)
        end

        def usage
          option_parser([]).to_s
        end

        def description(command)
          "Interactively evaluate SassScript"
        end

        def parse!(arguments)
          parser = option_parser(arguments)
          parser.parse!
          parser.options
        end

      end

    end
  end
end

Version data entries

108 entries across 106 versions & 8 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/compass-1.0.3/lib/compass/commands/interactive.rb
compass-1.0.3 lib/compass/commands/interactive.rb
compass-1.1.0.alpha.3 lib/compass/commands/interactive.rb
compass-1.1.0.alpha.2 lib/compass/commands/interactive.rb
compass-1.1.0.alpha.1 lib/compass/commands/interactive.rb
compass-1.1.0.alpha.0 lib/compass/commands/interactive.rb
compass-1.0.1 lib/compass/commands/interactive.rb
compass-1.0.0 lib/compass/commands/interactive.rb
compass-1.0.0.rc.1 lib/compass/commands/interactive.rb
compass-1.0.0.rc.0 lib/compass/commands/interactive.rb
compass-0.12.7 lib/compass/commands/interactive.rb
compass-1.0.0.alpha.21 lib/compass/commands/interactive.rb
compass-1.0.0.alpha.20 lib/compass/commands/interactive.rb
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/compass-0.12.3/lib/compass/commands/interactive.rb
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/compass-0.12.3/lib/compass/commands/interactive.rb
compass-0.12.6 lib/compass/commands/interactive.rb
compass-0.12.5 lib/compass/commands/interactive.rb
compass-0.12.4 lib/compass/commands/interactive.rb
compass-1.0.0.alpha.19 lib/compass/commands/interactive.rb
compass-0.12.3 lib/compass/commands/interactive.rb