Class: EmberCli::Capture
- Inherits:
-
Object
- Object
- EmberCli::Capture
- Defined in:
- lib/ember_cli/capture.rb
Instance Method Summary collapse
- #capture ⇒ Object
-
#initialize(sprockets:, &block) ⇒ Capture
constructor
A new instance of Capture.
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
#capture ⇒ Object
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 |