Class: YNRouteUtil
Overview
配置请求路由create by yan
Constant Summary collapse
- @@route_hash =
{ "/RubyServer/hello" => "say_hello", "/RubyServer/json" => "test_json", "/RubyServer/none" => "none_method" }
Instance Method Summary collapse
Instance Method Details
#each ⇒ Object
33 34 35 36 37 38 |
# File 'lib/yn_route_util.rb', line 33 def each raise 'please provide a block!' unless block_given? @@route_hash.each do |e| yield e end end |
#get_method(route) ⇒ Object
end
29 30 31 |
# File 'lib/yn_route_util.rb', line 29 def get_method(route) @@route_hash[route] end |