Sha256: c32fe0e44b9f34bc7caf459e8862d7a8d99bf5e0523235c3cec622d2b81fa93e

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

module Joybox
  module Configuration

    class Debug

      def self.default_configuration
        {
          repl: false,
          bounding_box: false
        }
      end

      def self.configure(options = {})
        options = options.nil? ? default_configuration : default_configuration.merge!(options)
        options[:repl] = true if options[:bounding_box]

        Object.send(:include, Joybox) if options[:repl]
        Sprite.send(:include, Joybox::Debug::Node) if options[:repl]

        Joybox::Debug.repl = options[:repl]
        Joybox::Debug.bounding_box = options[:bounding_box]
      end 

    end

  end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
joybox-1.0.0 motion/joybox-ios/configuration/debug.rb
joybox-1.0.0 motion/joybox-osx/configuration/debug.rb