Sha256: 2bdc1010f6667505875fd6a03ecb921b2543c38e8c44940ab797b3928e8770a7

Contents?: true

Size: 405 Bytes

Versions: 3

Compression:

Stored size: 405 Bytes

Contents

module CapUtil

  class Halted < RuntimeError
    def backtrace; []; end
  end

  def self.halt(msg = 'halted')
    raise CapUtil::Halted, color(msg, :bold, :yellow)
  end

  module Halt

    def self.included(receiver)
      receiver.send(:extend,  HaltMethods)
      receiver.send(:include, HaltMethods)
    end

    module HaltMethods
      def halt(*args); CapUtil.halt(*args); end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cap-util-1.5.2 lib/cap-util/halt.rb
cap-util-1.5.1 lib/cap-util/halt.rb
cap-util-1.5.0 lib/cap-util/halt.rb