Added support for multiple configs (local only for now)

This commit is contained in:
2020-06-17 08:37:26 -05:00
parent 77afa80ca9
commit 80b6321c46
10 changed files with 167 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
module TAC
class Settings
attr_accessor :hostname, :port
attr_accessor :hostname, :port, :config
def initialize
parse(File.read(TAC::SETTINGS_PATH))
end
@@ -10,6 +10,7 @@ module TAC
@hostname = data[:data][:hostname]
@port = data[:data][:port]
@config = data[:data][:config]
end
def to_json(*args)
@@ -17,6 +18,7 @@ module TAC
data: {
hostname: @hostname,
port: @port,
config: @config,
}
}.to_json(*args)
end