Returns true
if stat is readable by the real user id of this process.
File.stat("testfile").readable_real? #=> true
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"
Returns true
if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
If stat is writable by others, returns an integer representing the file permission bits of stat. Returns nil
otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2)
.
m = File.stat("/tmp").world_writable? #=> 511 sprintf("%o", m) #=> "777"
Same as executable?
, but tests using the real owner of the process.
Returns a Gem::StubSpecification
for default gems
Loads the default specifications. It should be called only once.
Returns the full path to an executable named name
in this gem.
Returns the full path to the cached gem for this spec.
The default value for specification attribute name
The default (generated) file name of the gem. See also spec_name
.
spec.file_name # => "example-1.0.gem"
Files in the Gem under one of the require_paths
Return a NameTuple that represents this Specification
Return a string containing a Ruby code representation of the given object.
Returns the full path to this spec’s gemspec file. eg: /usr/local/lib/ruby/gems/1.8/specifications/mygem-1.0.gemspec
The provided block
is passed a header and field for each pair in the row and expected to return true
or false
, depending on whether the pair should be deleted.
This method returns the row for chaining.
If no block is given, an Enumerator
is returned.
Removes any column or row for which the block returns true
. In the default mixed mode or row mode, iteration is the standard row major walking of rows. In column mode, iteration will yield
two element tuples containing the column name and an Array
of values for that column.
This method returns the table for chaining.
If no block is given, an Enumerator
is returned.
Has a method been included in the list of insecure methods?