Sha256: c161bf919a867d4b7cb8f18931555e4cd3dfec8d8b9a40274bef61e079c90045
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 Bytes
Contents
require 'language_cards/controllers/application_controller' module LanguageCards module Controllers class MainMenu < ApplicationController def render(courses:, mode:) _title = t 'Menu.Title' _select = t 'Menu.Choose' _mode = t('Menu.GameMode') + case mode.peek when :translate then t 'Menu.ModeTranslate' when :typing_practice then t 'Menu.ModeTyping' end _toggle = "m: " + t('Menu.ToggleGameMode') _courses = courses.each.with_index.map {|item,index| "#{index + 1}: #{item}" } _mexit = t 'Menu.Exit' super(binding) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
language_cards-0.3.2 | lib/language_cards/controllers/main_menu.rb |
language_cards-0.3.1 | lib/language_cards/controllers/main_menu.rb |