Class: Compass::Commands::GenerateGridBackground
- Inherits:
-
ProjectBase
- Object
- Base
- ProjectBase
- Compass::Commands::GenerateGridBackground
- Includes:
- Actions
- Defined in:
- lib/compass/commands/generate_grid_background.rb
Instance Attribute Summary
Attributes included from Actions
Attributes inherited from ProjectBase
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(working_path, options) ⇒ GenerateGridBackground
constructor
A new instance of GenerateGridBackground.
- #perform ⇒ Object
Methods included from Actions
#basename, #compile, #copy, #directory, #relativize, #remove, #separate, #strip_trailing_separator, #write_file
Methods inherited from ProjectBase
Methods inherited from Base
Constructor Details
#initialize(working_path, options) ⇒ GenerateGridBackground
Returns a new instance of GenerateGridBackground.
9 10 11 12 |
# File 'lib/compass/commands/generate_grid_background.rb', line 9 def initialize(working_path, ) super assert_project_directory_exists! end |
Instance Method Details
#perform ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/compass/commands/generate_grid_background.rb', line 14 def perform column_width, gutter_width = [:grid_dimensions].split(/\+/).map{|d| d.to_i} unless GridBuilder.new(.merge(:column_width => column_width, :gutter_width => gutter_width, :output_path => projectize(project_images_subdirectory), :working_path => self.working_path)).generate! puts "ERROR: Some library dependencies appear to be missing." puts "Have you installed rmagick? If not, please run:" puts "sudo gem install rmagick" end end |