module Pod::Downloader::APIExposable
Public Instance Methods
expose_api(mod = nil, &block)
click to toggle source
# File lib/cocoapods-downloader/api_exposable.rb, line 4 def expose_api(mod = nil, &block) if mod.nil? if block.nil? raise "Either a module or a block that's used to create a module is required." else mod = Module.new(&block) end elsif mod && block raise 'Only a module *or* is required, not both.' end include mod # TODO: Try to find a nicer way to do this # See https://github.com/CocoaPods/cocoapods-downloader/pull/57 extend mod end
Also aliased as: override_api