Class: RailsTranslationManager::I18nTasksOptionParser

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_translation_manager/i18n_tasks_option_parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(task_options, locale) ⇒ I18nTasksOptionParser

Returns a new instance of I18nTasksOptionParser.



2
3
4
5
# File 'lib/rails_translation_manager/i18n_tasks_option_parser.rb', line 2

def initialize(task_options, locale)
  @task_options = task_options
  @locale = locale
end

Instance Method Details

#with_optional_localeObject



7
8
9
# File 'lib/rails_translation_manager/i18n_tasks_option_parser.rb', line 7

def with_optional_locale
  @locale ? @task_options << ["-l", @locale] : @task_options
end