Sha256: bbf9032861c55c67c2cbe853a4075b74f821945e6bb471eea822412d4a99942e

Contents?: true

Size: 667 Bytes

Versions: 11

Compression:

Stored size: 667 Bytes

Contents

require 'processing/all'


module Processing
  WINDOW  = Processing::Window.new {start}
  CONTEXT = Processing::Context.new WINDOW

  refine Object do
    (CONTEXT.methods - Object.instance_methods).each do |method|
      define_method method do |*args, **kwargs, &block|
        CONTEXT.__send__ method, *args, **kwargs, &block
      end
    end
  end
end# Processing


begin
  w, c = Processing::WINDOW, Processing::CONTEXT

  c.class.constants.each do |const|
    self.class.const_set const, c.class.const_get(const)
  end

  w.__send__ :begin_draw
  at_exit do
    w.__send__ :end_draw
    Processing::App.new {w.show}.start if c.hasUserBlocks__ && !$!
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
processing-0.5.14 lib/processing.rb
processing-0.5.13 lib/processing.rb
processing-0.5.12 lib/processing.rb
processing-0.5.11 lib/processing.rb
processing-0.5.10 lib/processing.rb
processing-0.5.9 lib/processing.rb
processing-0.5.8 lib/processing.rb
processing-0.5.6 lib/processing.rb
processing-0.5.5 lib/processing.rb
processing-0.5.4 lib/processing.rb
processing-0.5.3 lib/processing.rb