<commit_before># Legion

[![Dependency Status](https://gemnasium.com/hopsoft/legion.png)](https://gemnasium.com/hopsoft/legion)
[![Code Climate](https://codeclimate.com/github/hopsoft/legion.png)](https://codeclimate.com/github/hopsoft/legion)

### Concurrent processing made easy... even for MRI

Legion leverages distibuted Ruby (DRb) & threads to provide real concurrency.

* Works for all Rubies (including MRI)
* Takes care of the heavy lifting for you
* Lets you focus on business needs

## Quick Start

Desgin a class that will perform a single task concurrently.

```ruby
class Worker < Legion::Object

  # our single task
  # - can be named anything you like
  # - can take as many args as you like
  def work
    # expensive operations & logic
  end

  # runs before each method invocation
  before :work do
    # do things like datbase reconnects etc...
  end
<commit_msg>Readme tweak.<commit_after># Legion

[![Dependency Status](https://gemnasium.com/hopsoft/legion.png)](https://gemnasium.com/hopsoft/legion)
[![Code Climate](https://codeclimate.com/github/hopsoft/legion.png)](https://codeclimate.com/github/hopsoft/legion)

### Concurrent processing made easy... even for MRI

Legion leverages distibuted Ruby (DRb) & threads to provide real concurrency.

* Works for all Rubies (including MRI)
* Takes care of the heavy lifting for you
* Lets you focus on business logic

## Quick Start

Desgin a class that will perform a single task concurrently.

```ruby
class Worker < Legion::Object

  # our single task
  # - can be named anything you like
  # - can take as many args as you like
  def work
    # expensive operations & logic
  end

  # runs before each method invocation
  before :work do
    # do things like datbase reconnects etc...
  end

{'fraction_non_alphanumeric': 0.09909399773499433, 'fraction_numerical': 0.0, 'mean_word_length': 3.8677685950413223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1234860', 'n_tokens_mistral': 548, 'n_tokens_neox': 520, 'n_words': 195}