Sha256: 4275af0860a71cadac2a5070090af6b99e1d1f4bd354d5d37c7c220edb966f7c

Contents?: true

Size: 389 Bytes

Versions: 2

Compression:

Stored size: 389 Bytes

Contents

require 'rack'
require 'oj'

Oj.default_options = { mode: :compat }

module Heartcheck
  module Controllers
    class Base
      def index
        fail NotImplementError
      end

      protected

      def check(who)
        Oj.dump(executor.dispatch(Heartcheck.send("#{who}_checks")))
      end

      private

      def executor
        Heartcheck.executor
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
heartcheck-1.0.9 lib/heartcheck/controllers/base.rb
heartcheck-1.0.8 lib/heartcheck/controllers/base.rb