Module: Shine::CSS
- Defined in:
- lib/shine.rb
Defined Under Namespace
Classes: Compressor
Class Method Summary collapse
- .file(f, options = {}) ⇒ Object
- .files(input_files, options = {}) ⇒ Object
- .in_place(input_file_path) ⇒ Object
- .string(css, options = {}) ⇒ Object
Class Method Details
.file(f, options = {}) ⇒ Object
158 159 160 |
# File 'lib/shine.rb', line 158 def self.file(f, ={}) self.files(f, ) end |
.files(input_files, options = {}) ⇒ Object
162 163 164 165 166 167 |
# File 'lib/shine.rb', line 162 def self.files(input_files, ={}) input_files = [input_files] unless input_files.is_a?(Array) input_files.flatten! compressor = Shine::CSS::Compressor.new(input_files) compressor.compress() end |
.in_place(input_file_path) ⇒ Object
145 146 147 148 |
# File 'lib/shine.rb', line 145 def self.in_place(input_file_path) compressor = Shine::CSS::Compressor.new(input_file_path) compressor.compress_in_place end |
.string(css, options = {}) ⇒ Object
150 151 152 153 154 155 156 |
# File 'lib/shine.rb', line 150 def self.string(css, ={}) begin Shine.compress_string(css, :css, ) rescue CompressionError js end end |