See IO.foreach
when path
is a file.
See Dir.foreach
when path
is a directory.
Returns a Echo
object, for the given strings
Returns a Cat
object, for the given filenames
Returns a Concat
object, for the given jobs
Iterates a block for each line.
v
String
public setter for the scheme component v
. (with validation)
see also URI::Generic.check_scheme
require 'uri' uri = URI.parse("http://my.example.com") uri.scheme = "https" # => "https" uri #=> #<URI::HTTP:0x000000008e89e8 URL:https://my.example.com>
v
String
public setter for the path component v
. (with validation)
see also URI::Generic.check_path
require 'uri' uri = URI.parse("http://my.example.com/pub/files") uri.path = "/faq/" # => "/faq/" uri #=> #<URI::HTTP:0x000000008e89e8 URL:http://my.example.com/faq/>
Checks if URI
has a path
Checks if URI
is relative
Returns normalized URI
.
require 'uri' URI("HTTP://my.EXAMPLE.com").normalize #=> #<URI::HTTP http://my.example.com/>
Normalization here means:
scheme and host are converted to lowercase,
an empty path component is set to “/”.
Destructive version of normalize
returns attributes.
setter for attributes val
Iterates over the request headers
Sets the response’s status to the status
code
Iterates over each header in the response
Will this response body be returned using chunked transfer-encoding?