Class: DiscourseTheme::Config::PathSetting
- Inherits:
-
Object
- Object
- DiscourseTheme::Config::PathSetting
- Defined in:
- lib/discourse_theme/config.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #api_key=(val) ⇒ Object
- #components ⇒ Object
- #components=(val) ⇒ Object
-
#initialize(config, path) ⇒ PathSetting
constructor
A new instance of PathSetting.
- #theme_id ⇒ Object
- #theme_id=(theme_id) ⇒ Object
- #url ⇒ Object
- #url=(val) ⇒ Object
Constructor Details
#initialize(config, path) ⇒ PathSetting
Returns a new instance of PathSetting.
4 5 6 7 |
# File 'lib/discourse_theme/config.rb', line 4 def initialize(config, path) @config = config @path = path end |
Instance Method Details
#api_key ⇒ Object
9 10 11 |
# File 'lib/discourse_theme/config.rb', line 9 def api_key search_api_key(url) || safe_config["api_key"] end |
#api_key=(val) ⇒ Object
13 14 15 |
# File 'lib/discourse_theme/config.rb', line 13 def api_key=(val) set_api_key(url, val) end |
#components ⇒ Object
33 34 35 |
# File 'lib/discourse_theme/config.rb', line 33 def components safe_config["components"] end |
#components=(val) ⇒ Object
37 38 39 |
# File 'lib/discourse_theme/config.rb', line 37 def components=(val) set("components", val) end |
#theme_id ⇒ Object
25 26 27 |
# File 'lib/discourse_theme/config.rb', line 25 def theme_id safe_config["theme_id"].to_i end |
#theme_id=(theme_id) ⇒ Object
29 30 31 |
# File 'lib/discourse_theme/config.rb', line 29 def theme_id=(theme_id) set("theme_id", theme_id.to_i) end |
#url ⇒ Object
17 18 19 |
# File 'lib/discourse_theme/config.rb', line 17 def url safe_config["url"] end |
#url=(val) ⇒ Object
21 22 23 |
# File 'lib/discourse_theme/config.rb', line 21 def url=(val) set("url", val) end |