monfresh/ohana-sms

View on GitHub
app/presenters/categories_presenter.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module CategoriesPresenter
  def self.call
    I18n.t('choose_category', list: numbered_categories)
  end

  def self.numbered_categories
    I18n.t('categories').map.with_index { |cat, index| "##{index + 1}: #{cat}" }.join(', ')
  end
end