Results for: "String#[]"

Same as sym.to_s.length.

Returns true if self points to a mountpoint.

Joins the given pathnames onto self to create a new Pathname object.

path0 = Pathname.new("/usr")                # Pathname:/usr
path0 = path0.join("bin/ruby")              # Pathname:/usr/bin/ruby
    # is the same as
path1 = Pathname.new("/usr") + "bin/ruby"   # Pathname:/usr/bin/ruby
path0 == path1
    #=> true

Iterates over the directory tree in a depth first manner, yielding a Pathname for each file under “this” directory.

Returns an Enumerator if no block is given.

Since it is implemented by the standard library module Find, Find.prune can be used to control the traversal.

If self is ., yielded pathnames begin with a filename in the current directory, not ./.

See Find.find

Recursively deletes a directory, including all directories beneath it.

See FileUtils.rm_r

Taints this Pathname.

See Object.taint.

Untaints this Pathname.

See Object.untaint.

Returns all the bytes from the file, or the first N if specified.

See IO.binread.

Returns all the lines from the file.

See IO.readlines.

Writes contents to the file.

See IO.write.

Read symbolic link.

See File.readlink.

Returns a File::Stat object.

See File.stat.

See File.lstat.

Truncates the file to length bytes.

See File.truncate.

See FileTest.exist?.

See FileTest.sticky?.

See FileTest.symlink?.

See FileTest.writable?.

Removes a file or directory, using File.unlink if self is a file, or Dir.unlink as necessary.

Return line number of current parsing line. This number starts from 1.

Return scanner state of current token.

Stores a new value in the database with the given key as an index.

If the key already exists, this will update the value associated with the key.

Returns the given value.

Returns the number of keys in the database.

Returns a Hash in which the key-value pairs have been inverted.

Example:

require 'sdbm'

SDBM.open 'my_database' do |db|
  db.update('apple' => 'fruit', 'spinach' => 'vegetable')

  db.invert  #=> {"fruit" => "apple", "vegetable" => "spinach"}
end

Returns true if the database contains the given key.

Search took: 4ms  ·  Total Results: 3008