Override to display a longer description of what this command does.
Writes out this config file, replacing its source.
Changes in rubygems to lazily loading ‘rubygems/command` (in order to lazily load `optparse` as a side effect) affect bundler’s custom installer which uses ‘Gem::Command` without requiring it (up until bundler 2.2.29). This hook is to compensate for that missing require.
TODO: Remove when rubygems no longer supports running on bundler older than 2.2.29.
Verifies that this gem:
Contains a valid gem specification
Contains a contents archive
The contents archive is not corrupt
After verification the gem specification from the gem is available from spec
A detailed description of this gem. See also summary
Writes s to the stream. If the argument is not a String
it will be converted using .to_s
method. Returns the number of bytes written.
Formats and writes to the stream converting parameters under control of the format string.
See Kernel#sprintf
for format string details.
Random::Formatter#alphanumeric
generates a random alphanumeric string.
The argument n specifies the length, in characters, of the alphanumeric string to be generated.
If n is not specified or is nil, 16 is assumed. It may be larger in the future.
The result may contain A-Z, a-z and 0-9.
require 'random/formatter' prng.alphanumeric #=> "2BuBuLf3WfSKyQbR" prng.alphanumeric(10) #=> "i6K93NdqiH"
Writes pemmable
, which must respond to to_pem
to path
with the given permissions
. If passed cipher
and passphrase
those arguments will be passed to to_pem
.
Returns the list of private methods accessible to obj. If the all parameter is set to false
, only those methods in the receiver will be listed.
Returns an array of instance variable names for the receiver. Note that simply defining an accessor does not create the corresponding instance variable.
class Fred attr_accessor :a1 def initialize @iv = 3 end end Fred.new.instance_variables #=> [:@iv]
Returns the Fiber
scheduler, that was last set for the current thread with Fiber.set_scheduler
if and only if the current fiber is non-blocking.
Returns true
if the named file is writable by the real user and group id of this process. See access(3).
Note that some OS-level security features may cause this to return true even though the file is not writable by the real user/group.
If file_name is writable by others, returns an integer representing the file permission bits of file_name. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
file_name can be an IO
object.
File.world_writable?("/tmp") #=> 511 m = File.world_writable?("/tmp") sprintf("%o", m) #=> "777"
Return a list of the local variable names defined where this NameError
exception was raised.
Internal use only.
Return true if the caused method was called as private.
When this module is included in another, Ruby calls append_features
in this module, passing it the receiving module in mod. Ruby’s default implementation is to add the constants, methods, and module variables of this module to mod if this module has not already been added to mod or one of its ancestors. See also Module#include
.
When this module is prepended in another, Ruby calls prepend_features
in this module, passing it the receiving module in mod. Ruby’s default implementation is to overlay the constants, methods, and module variables of this module to mod if this module has not already been added to mod or one of its ancestors. See also Module#prepend
.
Creates an accessor method to allow assignment to the attribute symbol.id2name
. String
arguments are converted to symbols. Returns an array of defined method names as symbols.
Returns an array of the names of class variables in mod. This includes the names of class variables in any included modules, unless the inherit parameter is set to false
.
class One @@var1 = 1 end class Two < One @@var2 = 2 end One.class_variables #=> [:@@var1] Two.class_variables #=> [:@@var2, :@@var1] Two.class_variables(false) #=> [:@@var2]