Storing instance variable to date function

Continuing the discussion from Struggling with Date fields - select_month and select_year:

Hello everyone ,
I collect month from drop down and I stored that selected month in an instance variable in controller , if I want to that instance variable in date function like _. Today = instated of this I want to do today = @selected_month and loop through this variable today
How can I do this , I have searched but no answer matches for my requirement please some one help .

The variable needs to be inside a methed to be called by a loop process.

Def $month
@selected_month = puts "#{}’
loop do
$month ; sleep(1)
break if == 01

This will put out the current month until the clock hits 01 seconds