Class: CPEE::Frames::GetAllConfigs

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

Overview

}}}

Instance Method Summary collapse

Instance Method Details

#responseObject

{{{



60
61
62
63
64
# File 'lib/cpee-frames/implementation.rb', line 60

def response
  data_dir = @a[0]
  databack = JSON::pretty_generate(Dir.glob(File.join(data_dir,'*')).map{|f| File.basename(f)}.sort_by{|x| x.downcase})
  Riddl::Parameter::Complex.new('list','application/json',databack)
end