Method: Shoppe::Settings#method_missing
- Defined in:
- lib/shoppe/settings.rb
#method_missing(key, _ = nil) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/shoppe/settings.rb', line 12 def method_missing(key, _ = nil) key = key.to_s.gsub(/\?\z/, '') if value = @hash[key.to_s] value elsif I18n.translate("shoppe.settings.defaults").keys.include?(key.to_sym) I18n.translate("shoppe.settings.defaults")[key.to_sym] end end |