Method: JSONSchemer::Format.percent_encode
- Defined in:
- lib/json_schemer/format.rb
.percent_encode(data, regexp) ⇒ Object
90 91 92 93 94 |
# File 'lib/json_schemer/format.rb', line 90 def percent_encode(data, regexp) binary = data.b binary.gsub!(regexp, BINARY_TO_PERCENT_ENCODED) binary.force_encoding(data.encoding) end |