Class: Pod::Dependency
- Inherits:
-
Object
- Object
- Pod::Dependency
- Defined in:
- lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb
Instance Method Summary collapse
-
#initialize(name = nil, *requirements) ⇒ Dependency
constructor
A new instance of Dependency.
- #old_initialize ⇒ Object
Constructor Details
#initialize(name = nil, *requirements) ⇒ Dependency
Returns a new instance of Dependency.
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 269 def initialize(name = nil, *requirements) if requirements.nil? old_initialize(name) return end # 当使用本地Flutter并且json中有SOFEngine项时会报奇怪的错误 # if name == 'SOFEngine' # puts 1 # puts name, requirements # end CocoapodsSoulComponentPlugin.components.each do |each| # 判断模块名是否相符,注意如果是子模块会带上SOPods的前缀 next unless each.name == name || each.name == 'SOPods/' + name requirements = if each.local == true [{ name: each.name, path: each.path }] else [each.version] end end # if name == 'SOFEngine' # puts 2 # puts name, requirements # end old_initialize(name, *requirements) end |
Instance Method Details
#old_initialize ⇒ Object
267 |
# File 'lib/cocoapods-soul-component-plugin/command/soul-component-plugin.rb', line 267 alias old_initialize initialize |