 # ちょっと大げさな気もするけど外部的には変わらんし
 # 今後を見据えてクラス化しておく
 class Rule
-  rule:null
+  rule:""
   _regexp:null
   callback:null
   name:""
   router:null
   isVariable:false
   types:[]
-  constructor:(string, callback, router)->
-    @rule = string
+  constructor:(rule, callback, router)->
+    if typeof rule isnt "string" and typeof rule isnt "Number"
+      return
     @callback = callback
-    @_regexp = @_ruleToRegExp(string)
-
-    #これ…どうなんだろ…
     @router = router
-    @types = []
-
-    re = new RegExp(namedParam)
-    matched = string.match(re)
-    if matched isnt null
-      @isVariable = true
-      for m in matched
-        t = m.match(genericParam)||null
-        @types.push if t isnt null then t[1] else null
+    @update(rule)
+    # @rule = string
+    # @_regexp = @_ruleToRegExp(string)
+    # @types = []
+
+    # re = new RegExp(namedParam)
+    # matched = string.match(re)
+    # if matched isnt null
+    #   @isVariable = true
+    #   for m in matched
+    #     t = m.match(genericParam)||null
+    #     @types.push if t isnt null then t[1] else null
 
   #マッチするかどうかテスト
   # **args**

  notFound:null
  beforeAnytimeHandler:null
  direct:null
  isIE:false
  #URL パラメーター
  _params:

          callback && callback.apply(@, args)
        ,@
      }
    if not @.befores?
      return
    befores = @_keys(@.befores)
    for key in befores
      @registerHandler(key, @.befores[key], true)
    return

  # notFound で指定されたメソッドをバインド
