Q. reg modules -scope of executed code

I am DRYing up some code. Earlier I was creating modules and calling a
method in the module.
I am trying to avoid that so merely requiring the file, should execute
the code within the module – at the instance level. However, what I
find is that the code is executed at the module level. IS there any way
i can achieve this.


module Bindings

bind_key(KEY_UP, :prev_row)

more follow

include Bindings

Other file:

class Foo

def map_keys
require ‘myproj/bindings’

other bindings

bind_key(KEY_DEL, :delete)


def bind_key *args

Now, when I run this, I wish bind_key in Bindings to work at the
instance level of a Foo object.

Is this possible, or do I have to call a method from Foo ?
thx, rkumar