class FastshopCatalog::ServiceUrls

Constants

DEFAULT_BASE_URL
HOMOLOG_URLS
PRODUCTION_URLS

Attributes

env[R]

Public Class Methods

new(env) click to toggle source
# File lib/fastshop_catalog/service_urls.rb, line 26
def initialize(env)
  @env = env
end

Public Instance Methods

url_for(serv) click to toggle source
# File lib/fastshop_catalog/service_urls.rb, line 30
def url_for(serv)
  url = ""
  if env == "production"
    url = PRODUCTION_URLS.fetch(serv)
  else
    url = HOMOLOG_URLS.fetch(serv)
  end

  url
end