Receive input and choose where to start within script?

I’d like have 3 options,

Option 1, start from beginning of script and end after a certain block
of code

Option 2, start from the middle of the script and run till the end of
script

Option 3, run the whole script entirely

Could anyone provide some feedback on some vailla code so I can build
on?

def start_to_middle

end

def middle_to_end

end

option = gets.chomp

case option
when “option1”
start_to_middle
when “option2”
middle_to_end
when “option3”
start_to_middle
middle_to_end
end

Thank you for your assist, this has me headed in the right direction.