Class: Brief::Server::Handlers::Browse
- Inherits:
-
Object
- Object
- Brief::Server::Handlers::Browse
- Defined in:
- lib/brief/server/handlers/browse.rb
Class Method Summary collapse
Class Method Details
.handle(path_args, briefcase, options = {}) ⇒ Object
3 4 5 6 |
# File 'lib/brief/server/handlers/browse.rb', line 3 def self.handle(path_args, briefcase, ={}) models = Array((briefcase.send(path_args) rescue nil)) [200, {"Content-Type"=>"application/json"}, models.map(&:as_json)] end |