Class: EmberCli::Capture

Inherits:
Object
  • Object
show all
Defined in:
lib/ember_cli/capture.rb

Instance Method Summary collapse

Constructor Details

#initialize(sprockets:, &block) ⇒ Capture

Returns a new instance of Capture.



3
4
5
6
# File 'lib/ember_cli/capture.rb', line 3

def initialize(sprockets:, &block)
  @sprockets = sprockets
  @block = block || NullBlock.new
end

Instance Method Details

#captureObject



8
9
10
11
12
13
14
# File 'lib/ember_cli/capture.rb', line 8

def capture
  if block.arity > 0
    block.call(*block_arguments)
  end

  [head.content, body.content]
end