Class: Plumb::Codec::URIEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/plumb/codec.rb

Overview

URI <=> scheme-prefixed URI string. The narrower HTTP/File variants win most-specific matching for fields typed as such; the produced value is validated against the declared URI class.

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



665
# File 'lib/plumb/codec.rb', line 665

def decode(str) = ::URI.parse(str)

#encode(uri) ⇒ Object



664
# File 'lib/plumb/codec.rb', line 664

def encode(uri) = uri.to_s