define methodname as instance method of current module, using ERB
object or eRuby file
define methodname as instance method of current module, using ERB
object or eRuby file
Set
header fields and a body from HTML form data. params
should be an Array
of Arrays or a Hash
containing HTML form data. Optional argument sep
means data record separator.
Values are URL encoded as necessary and the content-type is set to application/x-www-form-urlencoded
Example:
http.form_data = {"q" => "ruby", "lang" => "en"} http.form_data = {"q" => ["ruby", "perl"], "lang" => "en"} http.set_form_data({"q" => "ruby", "lang" => "en"}, ';')
Net::HTTPHeader#form_data=
is an alias for Net::HTTPHeader#set_form_data
.
Yields to a block and preserves the previous set of objects being printed.
Removes an object from the set of objects being pretty printed.
Creates a self-signed certificate with an issuer and subject from email
, a subject alternative name of email
and the given extensions
for the key
.
Retrieves the pre-configured API key key
or terminates interaction with an error.
Returns true when the user has enabled multifactor authentication from response
text and no otp provided by options.
Allows Gem::OptionParser
to handle HTTP URIs.
Asks for a password with a prompt
Asks the user to answer question
with an answer from the given list
.
Pops the most recent action from the log and undoes the action @param [DependencyGraph] graph @return [Action] the action that was popped off the log
@return [Array<Vertex>] the vertices of {#graph} that have an edge with
`self` as their {Edge#destination}
@return [Array<Vertex>] the vertices of {#graph} that have an edge with
`self` as their {Edge#origin}
(see Gem::Resolver::Molinillo::ResolutionState#activated)
(see Gem::Resolver::Molinillo::ResolutionState#possibilities)
(see Gem::Resolver::Molinillo::ResolutionState#depth)
(see Gem::Resolver::Molinillo::ResolutionState#conflicts)
If the stream begins with a BOM (byte order marker), consumes the BOM and sets the external encoding accordingly; returns the result encoding if found, or nil
otherwise:
File.write('t.tmp', "\u{FEFF}abc") io = File.open('t.tmp', 'rb') io.set_encoding_by_bom # => #<Encoding:UTF-8> io.close File.write('t.tmp', 'abc') io = File.open('t.tmp', 'rb') io.set_encoding_by_bom # => nil io.close
Raises an exception if the stream is not binmode or its encoding has already been set.
Open the specified filename (either in read-only mode or in read-write mode) and lock it for reading or writing.
The opened File
object will be returned. If read_only is true, and the file does not exist, then nil will be returned.
All exceptions are propagated.
Returns the last win32 socket Error
of the current executing Thread
or nil if none