Sha256: 103cb6b07cb50bb956605d9d0a8eee199166c12150d9bbe6c29feadd5f931187

Contents?: true

Size: 403 Bytes

Versions: 7

Compression:

Stored size: 403 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

7 entries across 7 versions & 1 rubygems

Version Path
cap-util-1.4.0 lib/cap-util/halt.rb
cap-util-1.3.0 lib/cap-util/halt.rb
cap-util-1.2.0 lib/cap-util/halt.rb
cap-util-1.1.0 lib/cap-util/halt.rb
cap-util-1.0.1 lib/cap-util/halt.rb
cap-util-1.0.0 lib/cap-util/halt.rb
cap-util-1.0.0.rc1 lib/cap-util/halt.rb