title: Possible to run command like "pod install" or "Pod::Command::Install.run" while developing a pre-hook cocoapods plugin?
body: <p>I am creating a cocoapods plugin to seamlessly integrate flutter into an existing iOS project without polluting the main project.</p>
  
  <p>The <a href="https://github.com/upgrad/cocoapods-integrate-flutter" rel="nofollow noreferrer">cocoapods plugin</a> will be applied to the main project Podfile and will run <a href="https://github.com/flutter/flutter/blob/master/packages/flutter_tools/templates/module/ios/library/Flutter.tmpl/podhelper.rb" rel="nofollow noreferrer">this</a> ruby file from the flutter repository. I am almost done with the plugin development, in fact, this will run with no problems if the flutter project does not contain any plugins.</p>
  
  <p>But there is a <a href="https://github.com/upgrad/cocoapods-integrate-flutter/blob/b0192c19997b7d084cf22485ba09cc657b633998/lib/cocoapods-integrate-flutter/flutter_pre_install_script.rb#L35" rel="nofollow noreferrer">code</a> that runs when the flutter project contains plugins. This script creates a symlink hidden directory inside the flutter application path and adds plugins' directories in it. Then it calls <code>pod install</code> with that path to install plugins as <code>pod</code> dependencies in the main project. I want to do all of this inside the plugin.</p>
  
  <p>Currently running this plugin gives me following error:
  <code>NoMethodError - undefined method pod for &lt;CocoapodsIntegrateFlutter::IntegrateFlutter:0x00007fa5b1f7c110&gt;</code> which is understandable since <code>pod</code> essentially is an executable.</p>
  
  <p>Is it possible to call <code>pod install</code> or <code>Pod::Command::Install.run</code> or something like this to add new dependencies from the plugin to the Podfile?</p>