Class: TestServer::StringController
Instance Method Summary
collapse
Methods included from WebHelper
#configure_caching, #encode, #generate_eicar, #generate_random_string, #generate_string
Instance Method Details
#eicar ⇒ Object
13
14
15
|
# File 'app/controllers/test_server/string_controller.rb', line 13
def eicar
render text: encode(params) { generate_eicar.join }
end
|
#index ⇒ Object
4
5
6
7
|
# File 'app/controllers/test_server/string_controller.rb', line 4
def index
add_breadcrumb I18n.t('views.root.link'), :root_path
add_breadcrumb I18n.t('views.string.link'), :string_path
end
|
#plain ⇒ Object
9
10
11
|
# File 'app/controllers/test_server/string_controller.rb', line 9
def plain
render text: encode(params) { generate_string(params[:count]) }
end
|
#random ⇒ Object
23
24
25
|
# File 'app/controllers/test_server/string_controller.rb', line 23
def random
render text: encode(params) { generate_random_string(params[:count]) }
end
|
#sleep ⇒ Object
17
18
19
20
21
|
# File 'app/controllers/test_server/string_controller.rb', line 17
def sleep
Kernel.sleep params[:count].to_i
render text: encode(params) { generate_string(1) }
end
|