Class: Mycommands::ParamController
Instance Method Summary
collapse
Methods inherited from Controller
#initialize, #render
Instance Method Details
#show(params = nil) ⇒ Object
3
4
5
6
7
|
# File 'lib/mycommands/controllers/param_controller.rb', line 3
def show params = nil
@params ||= params
@param = @params.current_param.description
render
end
|
#update(input) ⇒ Object
9
10
11
12
13
14
15
16
17
|
# File 'lib/mycommands/controllers/param_controller.rb', line 9
def update input
@params.current_param.substitute input
@params.next_param
if @params.all_substituted?
@application.dispatch([:Command, :update])
else
@application.dispatch([:Param, :show])
end
end
|