Class: AsyncBlock::SourceToBlock
- Inherits:
-
Object
- Object
- AsyncBlock::SourceToBlock
- Defined in:
- lib/async_block/block_source_service.rb
Overview
SourceToBlock - converts source string to code block 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 SourceToBlock
block = BlockToSource.new(block_string).convert block&.call
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(source) ⇒ SourceToBlock
constructor
A new instance of SourceToBlock.
Constructor Details
#initialize(source) ⇒ SourceToBlock
Returns a new instance of SourceToBlock.
37 38 39 |
# File 'lib/async_block/block_source_service.rb', line 37 def initialize(source) @source = source end |
Instance Method Details
#convert ⇒ Object
41 42 43 |
# File 'lib/async_block/block_source_service.rb', line 41 def convert source_to_block end |