Method: Iri#host
- Defined in:
- lib/iri.rb
#host(val) ⇒ Iri
Replaces the host part of the URI.
237 238 239 240 241 242 243 244 |
# File 'lib/iri.rb', line 237 def host(val) raise ArgumentError, "The host can't be nil" if val.nil? val = val.to_s raise ArgumentError, "The host can't be empty" if val.empty? modify do |c| c.host = val end end |