Module: FidoMetadata::Coercer::EscapedURI
- Defined in:
- lib/fido_metadata/coercer/escaped_uri.rb
Class Method Summary collapse
-
.coerce(value) ⇒ Object
The character # is a reserved character and not allowed in URLs, it is replaced by its hex value %x23.
Class Method Details
.coerce(value) ⇒ Object
The character # is a reserved character and not allowed in URLs, it is replaced by its hex value %x23. fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-metadata-service-v2.0-rd-20180702.html#idl-def-MetadataTOCPayloadEntry
10 11 12 13 14 |
# File 'lib/fido_metadata/coercer/escaped_uri.rb', line 10 def self.coerce(value) return value if value.is_a?(URI) URI(value.gsub(/%x23/, "#")) if value end |