show.xml.ruby 377 B

123456789101112
  1. doc = Ox::Document.new(version: '1.0')
  2. doc << Ox::Element.new('XRD').tap do |xrd|
  3. xrd['xmlns'] = 'http://docs.oasis-open.org/ns/xri/xrd-1.0'
  4. xrd << Ox::Element.new('Link').tap do |link|
  5. link['rel'] = 'lrdd'
  6. link['template'] = @webfinger_template
  7. end
  8. end
  9. ('<?xml version="1.0" encoding="UTF-8"?>' + Ox.dump(doc, effort: :tolerant)).force_encoding('UTF-8')