class Addressable::URI
def normalized_fragment
-
(String)
- The fragment component, normalized.
def normalized_fragment return nil unless self.fragment return @normalized_fragment if defined?(@normalized_fragment) @normalized_fragment ||= begin component = Addressable::URI.normalize_component( self.fragment, Addressable::URI::CharacterClasses::FRAGMENT ) component == "" ? nil : component end # All normalized values should be UTF-8 if @normalized_fragment @normalized_fragment.force_encoding(Encoding::UTF_8) end @normalized_fragment end