Created
April 26, 2017 14:48
-
-
Save dmitry-ilyashevich/0ceb7bec83d9c6a5b7b484db7ad9d54c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Analytics::AppIdGenerator | |
attr_accessor :current_site | |
DEFAULT_APP_ID = 200 | |
def initialize(current_site = 'fashion', _request_host = nil) | |
self.current_site = current_site | |
end | |
def app_id | |
send("#{current_site.gsub(/\.|\-/, "_")}_app_id") | |
ensure | |
DEFAULT_APP_ID | |
end | |
def fashion_app_id | |
200 | |
end | |
def sheknows_fashion_app_id | |
201 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment