Hi guys,
Can you help me with below code 
I want to keep clean my main.lua as much as possible…
So I want to call ads from ads.lua, and not from main.lua.
ads.lua :
local ads = require( "ads" ) -------------------------------------------------------------- Initializing the Providers if ( system.getInfo("platformName") == "Android" ) then ads.init( "admob", "your-ad-unit-id-here", adMobListener ) else ads.init( "iads", "com.yourcompany.yourapp", iAdsListener ) end ads.init( "vungle", "yourAppID", vungleListener ) -------------------------------------------------------------- Initializing the Providers -------------------------------------------------------------- Coding the callback listners local function vungleListener( event ) -- Video ad not yet downloaded and available if( event.type == "adStart" and event.isError ) then if( system.getInfo("platformName") == "Android" ) then ads:setCurrentProvider( "admob" ) else ads:setCurrentProvider( "iAds" ) end ads.show( "interstitial" ) elseif( event.type == "adEnd" ) then -- Ad was successfully shown and ended; hide the overlay so the app can resume. ads.hide() else print( "Received event", event.type ) end return true end local function iAdsListener( event ) if( event.isError ) then local options = { effect = "fade", time = 500, isModal = true } composer.showOverlay( "selfpromo", options ) end return true end local function adMobListener( event ) if ( event.isError ) then local options = { effect = "fade", time = 500, isModal = true } composer.showOverlay( "selfpromo", options ) end return true end --------------------------------------------------------- Starting the Ad Chain local params = { isAnimated = false, isAutoRotation = true, } ads:setCurrentProvider( "vungle" ) ads.show( "interstitial", params )
How to use/call above code from main.lua?
Many thanks! 
Ivan