def init_xml_methods()
      (class << self; self; end).class_eval do
        %w{ unread inbox starred all spam trash voicemail sms trash recorded placed received missed }.each do |method|
          define_method "#{method}_xml".to_sym do
            get_xml_document("https://www.google.com/voice/inbox/recent/#{method}")
          end
        end      
      end    
    end
def init_xml_methods()
      (class << self; self; end).class_eval do
        %w{ unread inbox starred all spam trash voicemail sms trash recorded placed received missed }.each do |method|
          define_method "#{method}_xml".to_sym do
            get_xml_document("https://www.google.com/voice/inbox/recent/#{method}")
          end
        end      
      end    
    end
Google provides XML data for various call histories all with the same
 URL pattern in a getful manner. So here we're just dynamically creating
 methods to fetch that data in a DRY-manner. Yes, define_method is slow,
 but we're already making web calls which drags performance down anyway
 so it shouldn't matter in the long run.