Class: SassListen::QueueOptimizer

Inherits:
Object
  • Object
show all
Defined in:
lib/sass-listen/queue_optimizer.rb

Defined Under Namespace

Classes: Config

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ QueueOptimizer

Returns a new instance of QueueOptimizer.


30
31
32
# File 'lib/sass-listen/queue_optimizer.rb', line 30

def initialize(config)
  @config = config
end

Instance Method Details

#smoosh_changes(changes) ⇒ Object


22
23
24
25
26
27
28
# File 'lib/sass-listen/queue_optimizer.rb', line 22

def smoosh_changes(changes)
  # TODO: adapter could be nil at this point (shutdown)
  cookies = changes.group_by do |_, _, _, _, options|
    (options || {})[:cookie]
  end
  _squash_changes(_reinterpret_related_changes(cookies))
end