Sha256: 4eb4f99c42a70e978e39ded2c0c62057ab9af5430bff06e3acea1af49805c816

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

module ESA
  class SubcontextChecker
    def self.check(context)
      ESA.configuration.context_providers_for_path(context.effective_path).each do |namespace,provider|
        if provider.is_a? Class and provider.respond_to? :check_subcontexts
          provider.check_subcontexts(context, namespace)
        elsif provider.respond_to? :count and provider.count == 2 and 
              provider[0].is_a? Class and provider[0].respond_to? :check_subcontexts and provider[1].is_a? Hash
          klass, options = provider
          klass.check_subcontexts(context, namespace, options)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
event_sourced_accounting-0.1.6 lib/esa/subcontext_checker.rb