Sha256: a4b50d31deeec62a49888c8c12f90e61d07f72411abea6087ed8e534761f67c8

Contents?: true

Size: 405 Bytes

Versions: 13

Compression:

Stored size: 405 Bytes

Contents

module Shiba
  class Explain
    module CheckSupport
      module ClassMethods
        def check(c)
          @checks ||= []
          @checks << c
        end

        def get_checks
          @checks
        end
      end

      def _run_checks!(&block)
        self.class.get_checks.each do |check|
          res = send(check)
          break if yield == :stop
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
shiba-0.9.4 lib/shiba/explain/check_support.rb
shiba-0.9.3 lib/shiba/explain/check_support.rb
shiba-0.9.2 lib/shiba/explain/check_support.rb
shiba-0.9.1 lib/shiba/explain/check_support.rb
shiba-0.9.0 lib/shiba/explain/check_support.rb
shiba-0.8.1 lib/shiba/explain/check_support.rb
shiba-0.6.4 lib/shiba/explain/check_support.rb
shiba-0.6.3 lib/shiba/explain/check_support.rb
shiba-0.6.2 lib/shiba/explain/check_support.rb
shiba-0.6.1 lib/shiba/explain/check_support.rb
shiba-0.6.0 lib/shiba/explain/check_support.rb
shiba-0.5.0 lib/shiba/explain/check_support.rb
shiba-0.4.0 lib/shiba/explain/check_support.rb