diff --git a/src/app.rb b/src/app.rb index c7dc02a..5c4bd1d 100755 --- a/src/app.rb +++ b/src/app.rb @@ -7,12 +7,7 @@ require "sqlite3" require "sassc" require_relative "database.rb" - -def get_random_subtitle - subtitles = File.readlines "misc/subtitles.txt" - subtitles.sample.chomp -end - +require_relative "func.rb" get "/" do slim :index diff --git a/src/func.rb b/src/func.rb new file mode 100644 index 0000000..eee09a3 --- /dev/null +++ b/src/func.rb @@ -0,0 +1,4 @@ +def get_random_subtitle + subtitles = File.readlines "misc/subtitles.txt" + subtitles.sample.chomp +end