# How to add function parameter and conditions dynamically?

**URL:** <https://www.ruby-forum.com/t/how-to-add-function-parameter-and-conditions-dynamically/135719>\
**Category:** Ruby\
**Created:** [April 24, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/how-to-add-function-parameter-and-conditions-dynamically/135719 "2008-04-24T13:47:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [April 24, 2008, 1:47pm UTC](https://www.ruby-forum.com/t/how-to-add-function-parameter-and-conditions-dynamically/135719/1 "2008-04-24T13:47:19Z")

</div>

Hi All,  
I have one function in that function i wanna add parameters and  
conditions dynamically.

I hope you got me if yes please tell me what should i do.

Thanks  
Varun K.

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [April 24, 2008, 11:31pm UTC](https://www.ruby-forum.com/t/how-to-add-function-parameter-and-conditions-dynamically/135719/2 "2008-04-24T23:31:35Z")

</div>

On 24.04.2008 13:47, Varun G. wrote:

> ```
> I have one function in that function i wanna add parameters and
> 
> ```
> 
> conditions dynamically.

“Function in a function”? Like

def a  
def b  
end  
end

?

> I hope you got me if yes please tell me what should i do.

No, come again. Do you want to

1. change the argument list of a method at runtime

2. change the set of arguments you pass a method at runtime

3. something completely different

?

Cheers

robert
