class PostyClient::Settings
Public Class Methods
access_token()
click to toggle source
# File lib/posty_client/settings.rb, line 27 def self.access_token current_settings['access_token'] end
api_url()
click to toggle source
# File lib/posty_client/settings.rb, line 31 def self.api_url current_settings['api_url'] end
api_version()
click to toggle source
# File lib/posty_client/settings.rb, line 35 def self.api_version current_settings['api_version'] end
current_server()
click to toggle source
# File lib/posty_client/settings.rb, line 11 def self.current_server Thread.current["attr_#{name}_current_server"] end
current_server=(server)
click to toggle source
# File lib/posty_client/settings.rb, line 15 def self.current_server=(server) Thread.current["attr_#{name}_current_server"] = server end
current_settings()
click to toggle source
# File lib/posty_client/settings.rb, line 19 def self.current_settings if current_server.present? settings[PostyClient.env]['servers'][current_server] else settings[PostyClient.env] end end
servers()
click to toggle source
# File lib/posty_client/settings.rb, line 7 def self.servers settings[PostyClient.env]['servers'].keys end