title: Call a method with dynamic class name in swift
body: <p>How can we call class functions with a dynamic class name?</p>
  
  <p>Assume the following example where I have two class with methods with same signature</p>
  
  <pre><code>class Foo{
     class func doSomething()
  
  }
  
  class Foobar {
     class func doSomething()
  }
  
  class ActualWork{
     //call following method with a variable type so that it accepts dynamic class  name
     func callDynamicClassMethod(x: dynamicClass)
      x.doSomething() 
    }
  </code></pre>
  
  <p>How can this be implemented so that x accepts values at run time</p>
  
  <p>Edit: Sorry, I missed to mention that I was looking for any other ways other than protocol oriented approach. This is more of an exploratory question to explore if there is a more direct approach/pods/libraries to achieve this.</p>