title: How do I create a function that chains multiple accessors?
body: <p>I want to create a function where I can chain accessors, but don't know how.</p>
  
  <p>For example, I have a class <code>A</code> which has a subclass <code>save</code>, and attached to that <code>save</code> class I have two methods <code>B()</code> and <code>C()</code>:</p>
  
  <pre><code>class A {
      class save {
         function B() {};
         function C() {};
   }
  }
  </code></pre>
  
  <p>I would like to be able to call them like so: <code>A.save.B();</code>, or <code>A.save.C();</code></p>