Instance_function

Useful? Better name?

class Module
def instance_function(name)
class_eval %{
def #{name}(*a,&b)
self.class.#{name}(*a,&b)
end
}
end
end

T.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs