Class: I18nLookup
- Inherits:
-
Object
- Object
- I18nLookup
- Defined in:
- lib/forge/app/models/i18n_lookup.rb
Class Method Summary collapse
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(klass) ⇒ I18nLookup
constructor
A new instance of I18nLookup.
Constructor Details
#initialize(klass) ⇒ I18nLookup
Returns a new instance of I18nLookup.
2 3 4 |
# File 'lib/forge/app/models/i18n_lookup.rb', line 2 def initialize(klass) @klass = klass end |
Class Method Details
.fields ⇒ Object
10 11 12 |
# File 'lib/forge/app/models/i18n_lookup.rb', line 10 def self.fields @@fields ||= YAML::load(File.open(Rails.root + 'config/i18n_fields.yml')).recursive_symbolize_keys! end |
Instance Method Details
#fields ⇒ Object
6 7 8 |
# File 'lib/forge/app/models/i18n_lookup.rb', line 6 def fields self.class.fields[:tables][@klass.to_s.underscore.pluralize.to_sym] end |