Method: I18n::Inflector::InflectionOptions#prepare_options!

Defined in:
lib/i18n-inflector/options.rb

#prepare_options!(options) ⇒ Hash

Note:

It modifies the given object.

This method processes the given argument in a way that it will use default values for options that are missing.

Parameters:

  • options (Hash)

    the options

Returns:

  • (Hash)

    the given options

[View source]

304
305
306
307
308
309
# File 'lib/i18n-inflector/options.rb', line 304

def prepare_options!(options)
  self.class.known.
  reject { |name,long| options.has_key?(long) }.
  each   { |name,long| options[long] = instance_variable_get(name) }
  options
end