Class: AsyncBlock::BlockToSource
- Inherits:
-
Object
- Object
- AsyncBlock::BlockToSource
- Defined in:
- lib/async_block/block_source_service.rb
Overview
BlockToSource - converts code block to source string this will help in preventing writing of new jobs to run smaller pieces of code
The following full app-like example demonstrates how to use the BlockToSource
block_string = BlockToSource.new(block).convert
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(block) ⇒ BlockToSource
constructor
A new instance of BlockToSource.
Constructor Details
#initialize(block) ⇒ BlockToSource
Returns a new instance of BlockToSource.
14 15 16 |
# File 'lib/async_block/block_source_service.rb', line 14 def initialize(block) @block = block end |
Instance Method Details
#convert ⇒ Object
18 19 20 |
# File 'lib/async_block/block_source_service.rb', line 18 def convert block_to_source end |