lib/orientdb/sql/ext.rb
def monkey_patch!(*args)
      args = %w{ symbol string } if args.empty?
      args.each do |arg|
        case arg.to_s.downcase.to_sym
          when :symbol
            if monkey_patched?(:symbol)
              puts "Symbol has already been monkey patched!"
              false
            else
              Symbol.send :include, OrderExtension
              Symbol.send :include, ConditionalExtension
              Symbol.send :include, FieldOperatorExtension
              Symbol.send :include, BundledFunctionExtension
              monkey_patched << :symbol
              true
            end
          when :string
            if monkey_patched?(:string)
              puts "String has already been monkey patched!"
              false
            else
              String.send :include, OrderExtension
              String.send :include, ConditionalExtension
              String.send :include, FieldOperatorExtension
              String.send :include, BundledFunctionExtension
              monkey_patched << :string
              true
            end
        end
      end
    end
def monkey_patch!(*args)
      args = %w{ symbol string } if args.empty?
      args.each do |arg|
        case arg.to_s.downcase.to_sym
          when :symbol
            if monkey_patched?(:symbol)
              puts "Symbol has already been monkey patched!"
              false
            else
              Symbol.send :include, OrderExtension
              Symbol.send :include, ConditionalExtension
              Symbol.send :include, FieldOperatorExtension
              Symbol.send :include, BundledFunctionExtension
              monkey_patched << :symbol
              true
            end
          when :string
            if monkey_patched?(:string)
              puts "String has already been monkey patched!"
              false
            else
              String.send :include, OrderExtension
              String.send :include, ConditionalExtension
              String.send :include, FieldOperatorExtension
              String.send :include, BundledFunctionExtension
              monkey_patched << :string
              true
            end
        end
      end
    end
Extend strings and/or symbols to create queries easier