class Tienda::Settings
Public Class Methods
new(hash)
click to toggle source
# File lib/tienda/settings.rb, line 3 def initialize(hash) @hash = hash end
Public Instance Methods
[](value)
click to toggle source
# File lib/tienda/settings.rb, line 20 def [](value) @hash[value] end
method_missing(key, _ = nil)
click to toggle source
# File lib/tienda/settings.rb, line 11 def method_missing(key, _ = nil) key = key.to_s.gsub(/\?\z/, '') if value = @hash[key.to_s] value elsif I18n.translate('tienda.settings.defaults').keys.include?(key.to_sym) I18n.translate('tienda.settings.defaults')[key.to_sym] end end
outbound_email_address()
click to toggle source
# File lib/tienda/settings.rb, line 7 def outbound_email_address "#{store_name} <#{email_address}>" end