Sha256: 33d85afcea1f7b5b45f8ffea531edabf115be91ae64abfc85ab0da66d75393b8
Contents?: true
Size: 512 Bytes
Versions: 1
Compression:
Stored size: 512 Bytes
Contents
module Earl class UrlAssembler def assemble( parts={} ) ''.tap do |url| url << ( parts[ :scheme ] + '://' ) if parts[ :scheme ] url << ( parts[ :subdomain ] + '.' ) if parts[ :subdomain ] url << ( parts[ :host ] ) if parts[ :host ] url << ( ':' + parts[ :port ] ) if parts[ :port ] url << ( '/' + parts[ :path ] ) if parts[ :path ] url << ( '?' + parts[ :search ] ) if parts[ :search ] url end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
earl-0.2.0 | lib/earl/url_assembler.rb |