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
{{{
459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/cpee-model-management/implementation.rb', line 459 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 |