Class: Swee::Config::AppConfig

Inherits:
BaseConfig show all
Defined in:
lib/swee/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseConfig

#[], #absolutely_app_path

Instance Attribute Details

#default_localeObject

Returns the value of attribute default_locale.



57
58
59
# File 'lib/swee/config.rb', line 57

def default_locale
  @default_locale
end

#emailObject

Returns the value of attribute email.



61
62
63
# File 'lib/swee/config.rb', line 61

def email
  @email
end

#include_pathObject

Returns the value of attribute include_path.



60
61
62
# File 'lib/swee/config.rb', line 60

def include_path
  @include_path
end

#page404Object

Returns the value of attribute page404.



58
59
60
# File 'lib/swee/config.rb', line 58

def page404
  @page404
end

#page500Object

Returns the value of attribute page500.



59
60
61
# File 'lib/swee/config.rb', line 59

def page500
  @page500
end

#time_zoneObject

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! options
  @time_zone      ||=  "Beijing"
  @default_locale ||=  "zh-CN"
  @page404        ||=  File.expand_path("./public/404.html",ENV["app_path"])
  @page500        ||=  File.expand_path("./public/500.html",ENV["app_path"])
  @include_path   ||=  []
  @email          ||=  {}
end