Sha256: 437f7970956cfaf9fb68b8f8ebb9e1e7bfb4301995930895b9072b4ac7ca30ce

Contents?: true

Size: 618 Bytes

Versions: 4

Compression:

Stored size: 618 Bytes

Contents

module ESA
  class SubcontextChecker
    def self.check(context)
      ESA::Config.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

4 entries across 4 versions & 1 rubygems

Version Path
event_sourced_accounting-0.1.4 lib/esa/subcontext_checker.rb
event_sourced_accounting-0.1.3 lib/esa/subcontext_checker.rb
event_sourced_accounting-0.1.1 lib/esa/subcontext_checker.rb
event_sourced_accounting-0.1.0 lib/esa/subcontext_checker.rb