module MSS::Core::Endpoints
Provides a read-only interface to the bundled endpoints.json file.
Public Class Methods
endpoints()
click to toggle source
# File lib/mss/core/endpoints.rb, line 27 def endpoints @endpoints ||= begin JSON.parse(File.read(File.join(MSS::ROOT, 'endpoints.json'))) end end
hostname(region, endpoint_prefix)
click to toggle source
# File lib/mss/core/endpoints.rb, line 20 def hostname(region, endpoint_prefix) region = endpoints["regions"][region] || {} endpoint = region[endpoint_prefix] || {} endpoint["hostname"] end
Private Instance Methods
endpoints()
click to toggle source
# File lib/mss/core/endpoints.rb, line 27 def endpoints @endpoints ||= begin JSON.parse(File.read(File.join(MSS::ROOT, 'endpoints.json'))) end end
hostname(region, endpoint_prefix)
click to toggle source
# File lib/mss/core/endpoints.rb, line 20 def hostname(region, endpoint_prefix) region = endpoints["regions"][region] || {} endpoint = region[endpoint_prefix] || {} endpoint["hostname"] end