Module: Babylonia::ClassMethods

Defined in:
lib/babylonia/class_methods.rb

Overview

Class methods to extend a class with in order to make it able to handle translatable attributes

Since:

  • 0.0.1

Instance Method Summary collapse

Instance Method Details

#build_babylonian_tower_on(*fields) ⇒ Object

Since:

  • 0.0.1



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/babylonia/class_methods.rb', line 239

def build_babylonian_tower_on(*fields)
  options = evaluate_locale_options_for(fields)
  
  fields.each do |field|
    install_locale_field_getter_for(field)
    install_locale_field_setter_for(field)
    install_locale_field_hash_for(field)
  end
  
  include HelperMethods
  install_localized_helper_for(fields)
  install_locales_helper_for(fields)
  
  include VirtualAttributes
  install_locale_options_evaluation(options)
end