Class: HS::Config
Constant Summary collapse
- DEFAULT_BASE_URL =
'http://hackerschool.ge'- DEFAULT_PREVIEW_DIR =
'previews'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #preview_dir ⇒ Object
- #publish_url ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
21 22 23 |
# File 'lib/hs/config.rb', line 21 def initialize @data = load_configuration end |
Class Method Details
.preview_dir ⇒ Object
17 18 19 |
# File 'lib/hs/config.rb', line 17 def self.preview_dir instance.preview_dir end |
.publish_url ⇒ Object
13 14 15 |
# File 'lib/hs/config.rb', line 13 def self.publish_url instance.publish_url end |
Instance Method Details
#preview_dir ⇒ Object
29 30 31 |
# File 'lib/hs/config.rb', line 29 def preview_dir @data['preview_dir'] || DEFAULT_PREVIEW_DIR end |
#publish_url ⇒ Object
25 26 27 |
# File 'lib/hs/config.rb', line 25 def publish_url @data['publish_url'] || DEFAULT_BASE_URL end |