Class: RestCore::DefaultQuery

Inherits:
Object
  • Object
show all
Includes:
Middleware
Defined in:
lib/rest-core/middleware/default_query.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.membersObject



4
# File 'lib/rest-core/middleware/default_query.rb', line 4

def self.members; [:query]; end

Instance Method Details

#call(env, &k) ⇒ Object



6
7
8
9
# File 'lib/rest-core/middleware/default_query.rb', line 6

def call env, &k
  q = merge_hash(@query, query(env), env[REQUEST_QUERY])
  app.call(env.merge(REQUEST_QUERY => q), &k)
end