Method: Velocity::Instance::Query::Sort#to_s

Defined in:
lib/acceleration/velocity.rb

#to_sObject

Create an XML string from the Sort object



368
369
370
371
372
373
374
375
# File 'lib/acceleration/velocity.rb', line 368

def to_s
  sane?
  builder = Nokogiri::XML::Builder.new do |xml|
    xml.sort(xpath: xpath, order: order)
  end
  # this is necessary to suppress the xml version declaration
  Nokogiri::XML(builder.to_xml).root.to_xml
end