Class: Compass::Commands::ExtensionCommand

Inherits:
Base
  • Object
show all
Includes:
InstallerCommand
Defined in:
lib/compass/commands/extension_command.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #working_path

Attributes included from Actions

#logger

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InstallerCommand

#app, #configure!, #installer, #installer_args

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) ⇒ ExtensionCommand

Returns a new instance of ExtensionCommand.



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

def initialize(working_path, options)
  super(working_path, options)
end

Class Method Details

.description(command) ⇒ Object



38
39
40
# File 'lib/compass/commands/extension_command.rb', line 38

def description(command)
  "Manage the list of compass extensions on your system"
end

.option_parser(arguments) ⇒ Object



31
32
33
34
# File 'lib/compass/commands/extension_command.rb', line 31

def option_parser(arguments)
  parser = Compass::Exec::CommandOptionParser.new(arguments)
  parser.extend(ExtensionsOptionParser)
end

.parse!(arguments) ⇒ Object



41
42
43
# File 'lib/compass/commands/extension_command.rb', line 41

def parse!(arguments)
  {:arguments => arguments}
end

.usageObject



35
36
37
# File 'lib/compass/commands/extension_command.rb', line 35

def usage
  option_parser([]).to_s
end

Instance Method Details

#performObject

all commands must implement perform



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

def perform
  require 'rubygems/gem_runner'
  Gem::GemRunner.new.run(options[:arguments])
end