This should go as a helper instead. Helpers are methods (functions) accessible from your views (rhtml files).
In your Hello Helper file you would have:
incoming_value * 2
In your Hello Controller, your index method would simply be:
Which calls your hello/index.rthml file, where you would have:
<%= times_two(5) %>
Which should display 10.