Sha256: 345c7874e05e8a6e0229490d0bcc7574861f1e3cbe4a9342747c6fef4c5c3214
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
# A discrete (ideally tuple-like) value at the # boundaries between adapters and reactors #class AbstractAdapter # def initialize(rx) # @reactor = rx # end # def drive # @reactor.engine.turn # end # def handle(event) # @reactor.react(event) # end #end #class ConsoleAdapter # def handle(event) # end #end #class AbstractDisruptor # include Disruptor::Processor # def initialize(adapter) # @adapter = adapter # end # def absorb(events) # @adapter.handle(event) # process_event(event) # end # def process_event(event) # raise "implement in subclass" # end #end #class SimpleDisruptor < AbstractDisruptor #end #class SimpleActor < AbstractReactor # def perform(story) #name, *args, &blk) # process(story.events) # story.events.each do |event| # @engine.adapt do |event| # @disruptor.absorb(event) # end # end # end #end #class WebsocketReactor < SimpleReactor # def react(name, *args, &blk) # raise 'not implemented' # end #end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
abstracta-0.1.1 | thoughts.rb.txt |