Class: VWO::Utils::GetAccountFlags
- Inherits:
-
Object
- Object
- VWO::Utils::GetAccountFlags
- Defined in:
- lib/vwo/utils/get_account_flags.rb
Constant Summary collapse
- @@instance =
nil
Class Method Summary collapse
Instance Method Summary collapse
- #get_account_id ⇒ Object
- #get_isNB_flag ⇒ Object
- #get_isNbv2_flag ⇒ Object
- #set_settings(settings) ⇒ Object
Class Method Details
.get_instance ⇒ Object
23 24 25 26 |
# File 'lib/vwo/utils/get_account_flags.rb', line 23 def self.get_instance @@instance = new if @@instance.nil? @@instance end |
Instance Method Details
#get_account_id ⇒ Object
44 45 46 47 48 49 50 |
# File 'lib/vwo/utils/get_account_flags.rb', line 44 def get_account_id account_id = nil if @settings && @settings.key?('accountId') && @settings['accountId'] account_id = @settings['accountId'] end return account_id end |
#get_isNB_flag ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/vwo/utils/get_account_flags.rb', line 36 def get_isNB_flag isNB = false if @settings && @settings.key?('isNB') && @settings['isNB'] isNB = @settings['isNB'] end return isNB end |
#get_isNbv2_flag ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/vwo/utils/get_account_flags.rb', line 28 def get_isNbv2_flag isNBv2 = false if @settings && @settings.key?('isNBv2') && @settings['isNBv2'] isNBv2 = @settings['isNBv2'] end return isNBv2 end |
#set_settings(settings) ⇒ Object
52 53 54 |
# File 'lib/vwo/utils/get_account_flags.rb', line 52 def set_settings(settings) @settings = settings end |