title: Inherit a class from a gem and add local methods
body: <p>I use a gem to manage certain attributes of a gmail api integration, and I'm pretty happy with the way it works. </p>
  
  <p>I want to add some local methods to act on the Gmail::Message class that is used in that gem.</p>
  
  <p>i.e. I want to do something like this. </p>
  
  <pre><code>models/GmailMessage.rb
    class GmailMessage &lt; Gmail::Message
  
      def initialize(gmail)
        #create a Gmail::Message instance as a GmailMessage instance 
        self = gmail
      end
  
      def something_clever
        #do something clever utilising the Gmail::Message methods
      end
    end
  </code></pre>
  
  <p>I don't want to persist it. But obviously I can't define self in that way.</p>
  
  <p>To clarify, I want to take an instance of Gmail::Message and create a GmailMessage instance which is a straight copy of that other message.</p>
  
  <p>I can then run methods like @gmail.subject and @gmail.html, but also run @gmail.something_clever... and save local attributes if necessary.</p>
  
  <p>Am I completely crazy? </p>