Class: Swee::Config::AppConfig
- Inherits:
-
BaseConfig
- Object
- BaseConfig
- Swee::Config::AppConfig
- Defined in:
- lib/swee/config.rb
Instance Attribute Summary collapse
-
#default_locale ⇒ Object
Returns the value of attribute default_locale.
-
#email ⇒ Object
Returns the value of attribute email.
-
#include_path ⇒ Object
Returns the value of attribute include_path.
-
#page404 ⇒ Object
Returns the value of attribute page404.
-
#page500 ⇒ Object
Returns the value of attribute page500.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
Instance Method Summary collapse
-
#default_config!(options) ⇒ Object
def page500=(_file) @page500 = absolutely_app_path(_file) end.
Methods inherited from BaseConfig
Instance Attribute Details
#default_locale ⇒ Object
Returns the value of attribute default_locale.
57 58 59 |
# File 'lib/swee/config.rb', line 57 def default_locale @default_locale end |
#email ⇒ Object
Returns the value of attribute email.
61 62 63 |
# File 'lib/swee/config.rb', line 61 def email @email end |
#include_path ⇒ Object
Returns the value of attribute include_path.
60 61 62 |
# File 'lib/swee/config.rb', line 60 def include_path @include_path end |
#page404 ⇒ Object
Returns the value of attribute page404.
58 59 60 |
# File 'lib/swee/config.rb', line 58 def page404 @page404 end |
#page500 ⇒ Object
Returns the value of attribute page500.
59 60 61 |
# File 'lib/swee/config.rb', line 59 def page500 @page500 end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
56 57 58 |
# File 'lib/swee/config.rb', line 56 def time_zone @time_zone end |
Instance Method Details
#default_config!(options) ⇒ Object
def page500=(_file)
@page500 = absolutely_app_path(_file)
end
71 72 73 74 75 76 77 78 |
# File 'lib/swee/config.rb', line 71 def default_config! @time_zone ||= "Beijing" @default_locale ||= "zh-CN" @page404 ||= File.("./public/404.html",ENV["app_path"]) @page500 ||= File.("./public/500.html",ENV["app_path"]) @include_path ||= [] @email ||= {} end |