mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:59:50 +08:00
32 lines
498 B
Ruby
32 lines
498 B
Ruby
module SiteSettings; end
|
|
|
|
class SiteSettings::LocalProcessProvider
|
|
|
|
Setting = Struct.new(:name, :value, :data_type) unless defined? SiteSettings::LocalProcessProvider::Setting
|
|
|
|
def initialize
|
|
@settings = {}
|
|
end
|
|
|
|
def all
|
|
@settings.values
|
|
end
|
|
|
|
def find(name)
|
|
@settings[name]
|
|
end
|
|
|
|
def save(name, value, data_type)
|
|
@settings[name] = Setting.new(name,value, data_type)
|
|
end
|
|
|
|
def destroy(name)
|
|
@settings.delete(name)
|
|
end
|
|
|
|
def current_site
|
|
"test"
|
|
end
|
|
|
|
end
|