Class: CPEE::Info

Inherits:
Riddl::Implementation
  • Object
show all
Defined in:
lib/cpee/implementation.rb

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/cpee/implementation.rb', line 436

def response
  opts = @a[0]
  id = @r[0].to_i
  unless CPEE::Persistence::exists?(id,opts)
    @status = 404
    return
  end
  Riddl::Parameter::Complex.new("info","text/xml") do
    i = XML::Smart::string <<-END
      <info instance='#{id}'>
        <notifications/>
        <properties/>
        <callbacks/>
      </info>
    END
    i.to_s
  end
end