Class: CPEE::ModelManagement::GetItem
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::ModelManagement::GetItem
- Defined in:
- lib/cpee-model-management/implementation.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Instance Method Details
#response ⇒ Object
{{{
452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/cpee-model-management/implementation.rb', line 452 def response where = @a[0] == :main ? '' : @r[0..-2].map{ |d| Riddl::Protocols::Utils::unescape(d) }.join('/') models = @a[1] name = File.basename(@r[-1],'.xml') fname = File.join(models,where,name + '.xml') if File.exist? fname Riddl::Parameter::Complex.new('content','application/xml',File.read(fname)) else @status = 400 end end |