Module: Tramway::RussianCasesHelper
- Defined in:
- app/helpers/tramway/russian_cases_helper.rb
Instance Method Summary collapse
- #case_word(model_name, case_name) ⇒ Object
- #dative(word) ⇒ Object
- #genitive(word) ⇒ Object
- #instrumental(word) ⇒ Object
- #russian_plural(word) ⇒ Object
Instance Method Details
#case_word(model_name, case_name) ⇒ Object
4 5 6 7 8 9 |
# File 'app/helpers/tramway/russian_cases_helper.rb', line 4 def case_word(model_name, case_name) word_case = I18n.t("cases.#{model_name.name.underscore}.#{case_name}") return word_case if word_case.present? raise "There is not #{case_name} implementation for \"#{model_name}\"" end |
#dative(word) ⇒ Object
19 20 21 |
# File 'app/helpers/tramway/russian_cases_helper.rb', line 19 def dative(word) case_word word, :dative end |
#genitive(word) ⇒ Object
11 12 13 |
# File 'app/helpers/tramway/russian_cases_helper.rb', line 11 def genitive(word) case_word word, :genitive end |
#instrumental(word) ⇒ Object
15 16 17 |
# File 'app/helpers/tramway/russian_cases_helper.rb', line 15 def instrumental(word) case_word word, :instrumental end |
#russian_plural(word) ⇒ Object
23 24 25 |
# File 'app/helpers/tramway/russian_cases_helper.rb', line 23 def russian_plural(word) case_word word, :plural end |