Class: UREST::GetProg

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

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



158
159
160
161
162
163
164
165
166
167
# File 'lib/urest.rb', line 158

def response
  opts = @a[0]
  fname = File.join(opts['dir'],@r[-1] + '.urp')
  if opts['progs'].include? fname
    return Riddl::Parameter::Complex.new('file','application/octet-stream',UREST::download_program(opts,fname),File.basename(fname))
  else
    @status = 403
  end
  nil
end