Class: Alula::Compressors::CSSCompressor

Inherits:
Object
  • Object
show all
Defined in:
lib/alula/compressors.rb

Instance Method Summary collapse

Instance Method Details

#compress(content) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/alula/compressors.rb', line 23

def compress(content)
  if content.count("\n") > 2
    Sass::Engine.new(content,
      :syntax => :scss,
      :cache => false,
      :read_cache => false,
      :style => :compressed).render
  else
    content
  end
end

#compresses?(item) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/alula/compressors.rb', line 19

def compresses?(item)
  return true
end