Sha256: 36bdfe9e2c97b528f3a6e0e23b00d8de255103dfaa96e1054b9c80d276ecfb0b

Contents?: true

Size: 434 Bytes

Versions: 7

Compression:

Stored size: 434 Bytes

Contents

module Checker
  class Result
    class << self
      def result(klass, exitstatus)
        debug klass
        debug exitstatus
        result_class(klass.classname).new(exitstatus)
      end

      def result_class(klass)
        "Checker::Results::#{klass}".constantize
      rescue NameError => e
        default_result_class
      end

      def default_result_class
        Checker::Results::Default
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
checker-0.8.0.beta2 lib/checker/result.rb
checker-0.8.0.beta lib/checker/result.rb
checker-0.7.0 lib/checker/result.rb
checker-0.6.6 lib/checker/result.rb
checker-0.6.5 lib/checker/result.rb
checker-0.6.5.rc2 lib/checker/result.rb
checker-0.6.5.rc1 lib/checker/result.rb