lib/substation.rb in substation-0.0.10.beta2 vs lib/substation.rb in substation-0.0.10

- old
+ new

@@ -1,5 +1,7 @@ +# encoding: utf-8 + require 'set' require 'forwardable' require 'adamantium' require 'equalizer' @@ -33,20 +35,54 @@ module Substation # Represent an undefined argument Undefined = Object.new.freeze + # An empty frozen array useful for (default) parameters + EMPTY_ARRAY = [].freeze + + # An empty frozen hash useful for (default) parameters + EMPTY_HASH = {}.freeze + + # Error raised when trying to access an unknown processor + UnknownProcessor = Class.new(StandardError) + + # Raised when trying to dispatch to an unregistered action + UnknownActionError = Class.new(StandardError) + + # Raised when an object is already registered under the a given name + AlreadyRegisteredError = Class.new(StandardError) + + # Raised when a reserved method is being given + ReservedNameError = Class.new(StandardError) + + # Raised when a duplicate {Processor} should be registered within a {Chain} + DuplicateProcessorError = Class.new(StandardError) end -require 'substation/utils' require 'substation/request' require 'substation/response' -require 'substation/observer' -require 'substation/chain' -require 'substation/chain/dsl' +require 'substation/response/api' +require 'substation/response/success' +require 'substation/response/failure' +require 'substation/response/exception' +require 'substation/response/exception/output' require 'substation/processor' +require 'substation/processor/builder' +require 'substation/processor/config' +require 'substation/processor/executor' require 'substation/processor/evaluator' -require 'substation/processor/pivot' +require 'substation/processor/evaluator/result' +require 'substation/processor/evaluator/handler' +require 'substation/processor/transformer' require 'substation/processor/wrapper' +require 'substation/processor/nest' +require 'substation/dsl/guard' +require 'substation/dsl/registry' +require 'substation/chain/definition' +require 'substation/chain' +require 'substation/chain/dsl' +require 'substation/chain/dsl/config' +require 'substation/chain/dsl/module_builder' require 'substation/environment' require 'substation/environment/dsl' require 'substation/dispatcher'