Class: PM::MapRelations
- Inherits:
-
Object
- Object
- PM::MapRelations
- Defined in:
- lib/cocoapods-byte-panglem-beta/config.rb
Overview
adn mediation adapter 三者之间的映射关系, mediation后续会用到
Constant Summary collapse
- ADNADAPTER =
Hash[ ## sdk 不需要 # 'Ads-CN' => 'ABUAdCsjAdapter', 'UnityAds' => 'ABUAdUnityAdapter', 'Google-Mobile-Ads-SDK'=> 'ABUAdAdmobAdapter', 'BaiduMobAdSDK'=> 'ABUAdBaiduAdapter', 'GDTMobSDK'=> 'ABUAdGdtAdapter', 'SigmobAd-iOS'=> 'ABUAdSigmobAdapter', 'KSAdSDK'=> 'ABUAdKsAdapter', 'KlevinAdSDK'=> 'ABUAdKlevinAdapter', 'MintegralAdSDK'=> 'ABUAdMintegralAdapter', ].freeze
- SERVERMAPADAPTER =
sdk 被接入adapter的映射关系
Hash[ 'GoogleMobileAdsMediationPangle'=> 'admob', 'IronSourcePangleAdapter'=> 'ironsource', 'AppLovinMediationByteDanceAdapter'=> 'max', 'TradPlusAdSDK/PangleAdapter'=> 'tradplus', 'AnyThinkiOS/AnyThinkPangleAdapter'=> 'topon', ].freeze
- SERVERMAPADN =
Hash[ 'UnityAds' => 'unity', 'Google-Mobile-Ads-SDK'=> 'admob', 'BaiduMobAdSDK'=> 'baidu', 'GDTMobSDK'=> 'gdt', 'SigmobAd-iOS'=> 'sigmob', 'KSAdSDK'=> 'ks', 'KlevinAdSDK'=> 'klevin', 'MintegralAdSDK'=> 'mtg', ].freeze
- SDKNAME =
"Ads-Global-Beta".freeze
- SDKRELY =
"BURelyFoundation_Global".freeze
- SHOULD_REMOVE =
[SDKNAME,SDKRELY]
Class Method Summary collapse
- .get_adapter(name) ⇒ Object
- .get_adapter_from_adn_abbreviation(name) ⇒ Object
- .get_adn(name) ⇒ Object
- .get_adn_abbreviation(name) ⇒ Object
- .get_all_adapter ⇒ Object
- .get_all_adn ⇒ Object
- .get_sdk ⇒ Object
- .is_adapter?(name) ⇒ Boolean
- .is_adn?(name) ⇒ Boolean
- .is_sdk?(name) ⇒ Boolean
- .should_remove_requirements?(name) ⇒ Boolean
Class Method Details
.get_adapter(name) ⇒ Object
139 140 141 142 143 144 145 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 139 def self.get_adapter(name) adapter = '' if is_adn?(name) adapter = ADNADAPTER[name] end adapter end |
.get_adapter_from_adn_abbreviation(name) ⇒ Object
119 120 121 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 119 def self.get_adapter_from_adn_abbreviation(name) SERVERMAPADAPTER[name] end |
.get_adn(name) ⇒ Object
147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 147 def self.get_adn(name) adn_name = '' if is_adapter?(name) ## .index 在调试时候会报错 ADNADAPTER.select{ |key, value| if value == name adn_name = key break end true } end adn_name end |
.get_adn_abbreviation(name) ⇒ Object
115 116 117 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 115 def self.get_adn_abbreviation(name) SERVERMAPADN[name] end |
.get_all_adapter ⇒ Object
162 163 164 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 162 def self.get_all_adapter ADNADAPTER.values end |
.get_all_adn ⇒ Object
166 167 168 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 166 def self.get_all_adn ADNADAPTER.keys end |
.get_sdk ⇒ Object
170 171 172 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 170 def self.get_sdk SDKNAME end |
.is_adapter?(name) ⇒ Boolean
131 132 133 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 131 def self.is_adapter?(name) SERVERMAPADAPTER.has_key?(name) end |
.is_adn?(name) ⇒ Boolean
111 112 113 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 111 def self.is_adn?(name) name == SDKNAME end |
.is_sdk?(name) ⇒ Boolean
127 128 129 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 127 def self.is_sdk?(name) SDKNAME==name end |
.should_remove_requirements?(name) ⇒ Boolean
135 136 137 |
# File 'lib/cocoapods-byte-panglem-beta/config.rb', line 135 def self.should_remove_requirements?(name) SHOULD_REMOVE.include?(name) end |