Sha256: 27f48413aa1975d12d3dd2515fcd4ccde73da126595bff9101207a14b5974c1e

Contents?: true

Size: 522 Bytes

Versions: 2

Compression:

Stored size: 522 Bytes

Contents

module RMExtensions

  def self.debug?
    !!@debug
  end

  def self.debug!(bool=true)
    @debug = bool
  end

  module ObjectExtensions

    module Util

      # Raises an exception when called from a thread other than the main thread.
      # Good for development and experimenting.
      def rmext_assert_main_thread!
        raise "This method must be called on the main thread." unless NSThread.currentThread.isMainThread
      end

    end

  end

end
Object.send(:include, ::RMExtensions::ObjectExtensions::Util)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rm-extensions-0.1.8 lib/motion/util.rb
rm-extensions-0.1.7 lib/motion/util.rb