Sha256: 987e82544eaeba15a0ff72560104a9d1c159082917b3fb696726200c45495ce9
Contents?: true
Size: 812 Bytes
Versions: 6
Compression:
Stored size: 812 Bytes
Contents
module ApiTaster class Mapper class << self def get(path, params = {}) map_method(:get, path, params) end def post(path, params = {}) map_method(:post, path, params) end def put(path, params = {}) map_method(:put, path, params) end def delete(path, params = {}) map_method(:delete, path, params) end private def map_method(method, path, params) route = Route.find_by_verb_and_path(method, path) if route.nil? Route.obsolete_definitions << { :verb => method, :path => path, :params => params } else Route.inputs[route[:id]] ||= [] Route.inputs[route[:id]] << params end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems