diff --git a/app/models/chunks/uri.rb b/app/models/chunks/uri.rb index f5a914c2..9251a2fd 100755 --- a/app/models/chunks/uri.rb +++ b/app/models/chunks/uri.rb @@ -60,8 +60,10 @@ class URIChunk < Chunk::Abstract "(?:\\#(#{FRAGMENT}))?" # Optional #fragment (\7) end - def self.pattern() - Regexp.new(URI_PATTERN, Regexp::EXTENDED, 'N') + URI_PATTERN_REGEXP = Regexp.new(URI_PATTERN, Regexp::EXTENDED, 'N') + + def self.pattern + URI_PATTERN_REGEXP end attr_reader :uri, :scheme, :user, :host, :port, :path, :query, :fragment, :link_text