Class: Compass::Commands::Interactive

Inherits:
ProjectBase show all
Defined in:
lib/compass/commands/interactive.rb

Instance Attribute Summary

Attributes inherited from ProjectBase

#options, #project_name

Attributes inherited from Base

#options, #working_path

Attributes included from Actions

#logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ProjectBase

#execute

Methods inherited from Base

#execute, #failed!, register, #successful?

Methods included from Actions

#basename, #copy, #directory, #log_action, #process_erb, #relativize, #remove, #separate, #strip_trailing_separator, #write_file

Constructor Details

#initialize(working_path, options) ⇒ Interactive

Returns a new instance of Interactive.



25
26
27
# File 'lib/compass/commands/interactive.rb', line 25

def initialize(working_path, options)
  super
end

Class Method Details

.description(command) ⇒ Object



47
48
49
# File 'lib/compass/commands/interactive.rb', line 47

def description(command)
  "Interactively evaluate SassScript"
end

.option_parser(arguments) ⇒ Object



36
37
38
39
40
41
# File 'lib/compass/commands/interactive.rb', line 36

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

.parse!(arguments) ⇒ Object



51
52
53
54
55
# File 'lib/compass/commands/interactive.rb', line 51

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

.usageObject



43
44
45
# File 'lib/compass/commands/interactive.rb', line 43

def usage
  option_parser([]).to_s
end

Instance Method Details

#performObject



29
30
31
32
# File 'lib/compass/commands/interactive.rb', line 29

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