exports.Text =
class Text
constructor: ( @text )->
exports.Text =
class Text
constructor: ( @text )->
no-op
regexString: ->
@text.replace /[.*+?^${}()|[\]\\]/g, "\\$&"
test: ( string )->
@text == string
returns a string for building the url if it matches the key conditions
url: ( string )->
if @test(string) then string else false
returns a unique id that can be compared to other parts
toString: ->
@text
@regex = /[\w\-_\\\/\.]+/
@parse = ( string )->
pattern = new RegExp "^#{ @regex.source }"
name = pattern.exec(string)[0]
new @ name