# File lib/quickbooks/ruby_magic.rb, line 12
  def delegate_methods(hsh)
    raise ArgumentError, "delegate_methods should be called like: delegate_methods [:method1, :method2] => :delegated_to_method" unless hsh.keys.first.is_a?(Array)
    methods = hsh.keys.first
    delegate_to = hsh[methods]
    methods.each do |method|
      self.send(:eval, "def \#{method}(*args, &block)\nblock_given? ? self.\#{delegate_to}.\#{method}(*args, &block) : self.\#{delegate_to}.\#{method}(*args)\nend\n"
      )
    end
  end