# Eventmachine parameters to post\_init

**URL:** <https://www.ruby-forum.com/t/eventmachine-parameters-to-post-init/140967>\
**Category:** Ruby\
**Created:** [June 20, 2008, 9:15am UTC](https://www.ruby-forum.com/t/eventmachine-parameters-to-post-init/140967 "2008-06-20T09:15:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [June 20, 2008, 9:15am UTC](https://www.ruby-forum.com/t/eventmachine-parameters-to-post-init/140967/1 "2008-06-20T09:15:42Z")

</div>

Hi!

I have a module which EventMachine mixes in to implement a UDP server.  
In this case the module’s post\_init method is called when someone  
connects and takes the place of a constructor, but how can I pass  
parameters to post\_init?

I have a configuration object that I want to share among all of my  
server instances, how do I accomplish that without making a global  
variable?

Les

---

<div class="post-metadata">

**Author:** ![leslieviljoen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/3d9bf3/32.png) [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Post date:** [June 20, 2008, 9:19am UTC](https://www.ruby-forum.com/t/eventmachine-parameters-to-post-init/140967/2 "2008-06-20T09:19:12Z")

</div>

On 6/20/08, Leslie V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi!
> 
> I have a module which EventMachine mixes in to implement a UDP server.  
> In this case the module’s post\_init method is called when someone  
> connects and takes the place of a constructor, but how can I pass  
> parameters to post\_init?
> 
> I have a configuration object that I want to share among all of my  
> server instances, how do I accomplish that without making a global  
> variable?

Nevermind, I see you can get EventMachine to make use of a class  
instead of a Module for new server instances. I’ll use that facility.

Les
