Joy-less / AlterRuby

This class allows you to easily run Ruby code in parallel by using "||".

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AlterRuby

This class allows you to easily run Ruby code in parallel by using "||".
Under MIT license so you can use in commercial projects.
Designed for use with RPG Maker VX Ace but also works with standard Ruby.

Turn this:

counter = 3
Thread.new {
  line_of_code()
  counter -= 1
}
Thread.new {
  line_of_code()
  counter -= 1
}
Thread.new {
  line_of_code()
  counter -= 1
}
while counter > 0
  sleep(0.01)
end

Into this:

AR('line_of_code() || line_of_code() || line_of_code()', binding)

About

This class allows you to easily run Ruby code in parallel by using "||".


Languages

Language:Ruby 100.0%