This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Bowling do | |
def score rolls do | |
calculate 1, rolls | |
end | |
def calculate i, list do | |
if i > 10 do | |
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/i18n_lookup.rb | |
class I18n::Backend::Simple | |
module Implementation | |
protected | |
def lookup(locale, key, scope = [], options = {}) | |
init_translations unless initialized? | |
keys = I18n.normalize_keys(locale, key, scope, options[:separator]) |
NewerOlder