Sha256: 95abe3f159171694e37c3c32a6be69704ee6279e3b15a33bdc576f8f3f8d69cc

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

module Crystal  
  class Processor
    inject(
      :config => :config,
      :workspace => :workspace,
      :logger => :logger
    )
    
    attr_accessor :next_processor
    
    def initialize next_processor
      @next_processor = next_processor
    end      
    
    def self.inspect
      self.name.split('::').last
    end    
  end
end
#       
#     # def call            
#     #   if workspace.error?
#     #     respond_to :on_error
#     #   else
#     #     begin
#     #       trace self.inspect do
#     #         respond_to :process
#     #       end
#     #     rescue Exception => e
#     #       workspace.error = e
#     #       respond_to :on_error          
#     #     end
#     #   end
#     # end
#     
#     
#     
#     # 
#     # Unwrapping Call Stack
#     # 
#     def result_error= error
#       @result_error = error
#     end
#     
#     def result!
#       @result_called.must_be.false
#       @result_called = true
#       raise @result_error if @result_error      
#     end
#     
#     def result_called?      
#       @result_called
#     end
#     attr_writer :result_called
# 
#     attr_accessor :after_block
#     def after &block
#       # @after_called.must_be.false
#       @after_block = block.must_be.defined
#       # @after_called = true
#     end
#     
#     # def after_called?
#     #   @after_called
#     # end
#     
#   end
# end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
crystal-0.0.13 lib/crystal/conveyor/processor.rb
crystal-0.0.12 lib/crystal/conveyor/processor.rb
crystal_ext-0.0.11 lib/crystal/conveyor/processor.rb