Module: Card::Set::I18nScope
- Included in:
- Card::Set
- Defined in:
- lib/card/set/i18n_scope.rb
Instance Method Summary collapse
-
#mod_name(backtrace) ⇒ Object
extract the mod name from the path of a set's tmp file.
-
#scope(backtrace) ⇒ Object
return scope for I18n.
Instance Method Details
#mod_name(backtrace) ⇒ Object
extract the mod name from the path of a set's tmp file
14 15 16 17 |
# File 'lib/card/set/i18n_scope.rb', line 14 def mod_name backtrace parts = path_parts backtrace mod_from_parts parts, path_set_index(parts) end |
#scope(backtrace) ⇒ Object
return scope for I18n
5 6 7 8 9 10 11 |
# File 'lib/card/set/i18n_scope.rb', line 5 def scope backtrace parts = path_parts backtrace index = path_set_index parts mod = mod_from_parts parts, index set = set_from_parts parts, index "mod.#{mod}.set.#{set}" end |