Class: Juicer::Merger::StylesheetMerger
- Defined in:
- lib/juicer/merger/stylesheet_merger.rb
Overview
Merge several files into one single output file. Resolves and adds in files from @import statements
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(files = [], options = {}) ⇒ StylesheetMerger
constructor
Constructor.
Methods inherited from Base
Methods included from Chainable
included, #next_in_chain, #next_in_chain=
Constructor Details
#initialize(files = [], options = {}) ⇒ StylesheetMerger
Constructor
Options:
-
:document_root
- Path to web root if there is any @import statements using absolute URLs
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/juicer/merger/stylesheet_merger.rb', line 19 def initialize(files = [], = {}) @dependency_resolver = CssDependencyResolver.new() super(files || [], ) @hosts = [:hosts] || [] @host_num = 0 @use_absolute = .key?(:absolute_urls) ? [:absolute_urls] : false @use_relative = .key?(:relative_urls) ? [:relative_urls] : false @document_root = [:document_root] @document_root = File.(@document_root).sub(/\/?$/, "") if @document_root # Make sure path doesn't end in a / end |