Class: Sprockets::LazyProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/sprockets/lazy_processor.rb

Overview

Internal: Used for lazy loading processors.

LazyProcessor.new { CoffeeScriptProcessor }

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ LazyProcessor

Returns a new instance of LazyProcessor



7
8
9
# File 'lib/sprockets/lazy_processor.rb', line 7

def initialize(&block)
  @block = block
end

Instance Method Details

#unwrapObject



11
12
13
# File 'lib/sprockets/lazy_processor.rb', line 11

def unwrap
  @obj ||= @block.call
end