Class: Trendi18n::ScopeTranslations

Inherits:
Object
  • Object
show all
Defined in:
lib/trendi18n/scope_translations.rb

Overview

Simple class use to caching hash of translations in scope

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(locale, to_translation_hash) ⇒ ScopeTranslations

Returns a new instance of ScopeTranslations.



8
9
10
# File 'lib/trendi18n/scope_translations.rb', line 8

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

Instance Attribute Details

#localeObject

Returns the value of attribute locale.



6
7
8
# File 'lib/trendi18n/scope_translations.rb', line 6

def locale
  @locale
end

#to_translation_hashObject

Returns the value of attribute to_translation_hash.



6
7
8
# File 'lib/trendi18n/scope_translations.rb', line 6

def to_translation_hash
  @to_translation_hash
end