Class: Compass::Commands::Imports
- Inherits:
-
ProjectBase
- Object
- Base
- ProjectBase
- Compass::Commands::Imports
- Defined in:
- lib/compass/commands/imports.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Attributes inherited from ProjectBase
Attributes inherited from Base
Attributes included from Actions
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(working_path, options) ⇒ Imports
constructor
A new instance of Imports.
Methods inherited from Base
#failed!, #perform, 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) ⇒ Imports
Returns a new instance of Imports.
6 7 8 |
# File 'lib/compass/commands/imports.rb', line 6 def initialize(working_path, ) super end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/compass/commands/imports.rb', line 4 def @options end |
Class Method Details
.description(command) ⇒ Object
16 17 18 |
# File 'lib/compass/commands/imports.rb', line 16 def description(command) "Emit an imports suitable for passing to the sass command-line." end |
.parse!(arguments) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/compass/commands/imports.rb', line 25 def parse!(arguments) if arguments.join("").strip.size > 0 raise OptionParser::ParseError, "This command takes no options or arguments." else {} end end |
.usage ⇒ Object
19 20 21 22 23 24 |
# File 'lib/compass/commands/imports.rb', line 19 def usage "Usage: compass imports\n\n" + "Prints out the imports known to compass.\n"+ "Useful for passing imports to the sass command line:\n" + " sass -r compass `compass imports` a_file_using_compass.sass" end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 |
# File 'lib/compass/commands/imports.rb', line 10 def execute print ::Compass::Frameworks::ALL.map{|f| "-I #{f.stylesheets_directory}" }.join(' ') end |