Class: DiscourseTheme::Config::PathSetting

Inherits:
Object
  • Object
show all
Defined in:
lib/discourse_theme/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, path) ⇒ PathSetting

Returns a new instance of PathSetting.



5
6
7
8
# File 'lib/discourse_theme/config.rb', line 5

def initialize(config, path)
  @config = config
  @path = path
end

Instance Method Details

#api_keyObject



10
11
12
# File 'lib/discourse_theme/config.rb', line 10

def api_key
  search_api_key(url) || safe_config["api_key"]
end

#api_key=(val) ⇒ Object



14
15
16
# File 'lib/discourse_theme/config.rb', line 14

def api_key=(val)
  set_api_key(url, val)
end

#componentsObject



34
35
36
# File 'lib/discourse_theme/config.rb', line 34

def components
  safe_config["components"]
end

#components=(val) ⇒ Object



38
39
40
# File 'lib/discourse_theme/config.rb', line 38

def components=(val)
  set("components", val)
end

#theme_idObject



26
27
28
# File 'lib/discourse_theme/config.rb', line 26

def theme_id
  safe_config["theme_id"].to_i
end

#theme_id=(theme_id) ⇒ Object



30
31
32
# File 'lib/discourse_theme/config.rb', line 30

def theme_id=(theme_id)
  set("theme_id", theme_id.to_i)
end

#urlObject



18
19
20
# File 'lib/discourse_theme/config.rb', line 18

def url
  safe_config["url"]
end

#url=(val) ⇒ Object



22
23
24
# File 'lib/discourse_theme/config.rb', line 22

def url=(val)
  set("url", val)
end