Class: CPEE::Info

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

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File 'lib/cpee/implementation.rb', line 353

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