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
11 12 13 |
# File 'lib/card/set/i18n_scope.rb', line 11 def mod_name backtrace tmp_set_path_parts(backtrace).first end |
#scope(backtrace) ⇒ Object
return scope for I18n
5 6 7 8 |
# File 'lib/card/set/i18n_scope.rb', line 5 def scope backtrace parts = tmp_set_path_parts backtrace "mod.#{parts.first}.set.#{parts[1..-1].join '.'}" end |