Results for: "optionparser"

Returns the values in self as an array:

Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.to_a # => ["Joe Smith", "123 Maple, Anytown NC", 12345]

Related: members.

Like Symbol#<=>, but case-insensitive; equivalent to self.to_s.casecmp(object.to_s):

lower = :abc
upper = :ABC
upper.casecmp(lower) # => 0
lower.casecmp(lower) # => 0
lower.casecmp(upper) # => 0

Returns nil if self and object have incompatible encodings, or if object is not a symbol:

sym = 'äöü'.encode("ISO-8859-1").to_sym
other_sym = 'ÄÖÜ'
sym.casecmp(other_sym) # => nil
:foo.casecmp(2)        # => nil

Unlike Symbol#casecmp?, case-insensitivity does not work for characters outside of ‘A’..‘Z’ and ‘a’..‘z’:

lower = :äöü
upper = :ÄÖÜ
upper.casecmp(lower) # => -1
lower.casecmp(lower) # => 0
lower.casecmp(upper) # => 1

Related: Symbol#casecmp?, String#casecmp.

Returns true if self and object are equal after Unicode case folding, otherwise false:

lower = :abc
upper = :ABC
upper.casecmp?(lower) # => true
lower.casecmp?(lower) # => true
lower.casecmp?(upper) # => true

Returns nil if self and object have incompatible encodings, or if object is not a symbol:

sym = 'äöü'.encode("ISO-8859-1").to_sym
other_sym = 'ÄÖÜ'
sym.casecmp?(other_sym) # => nil
:foo.casecmp?(2)        # => nil

Unlike Symbol#casecmp, works for characters outside of ‘A’..‘Z’ and ‘a’..‘z’:

lower = :äöü
upper = :ÄÖÜ
upper.casecmp?(lower) # => true
lower.casecmp?(lower) # => true
lower.casecmp?(upper) # => true

Related: Symbol#casecmp, String#casecmp?.

Returns true if self is :'', false otherwise.

Equivalent to sym.to_s.upcase.to_sym.

See String#upcase.

Equivalent to sym.to_s.downcase.to_sym.

See String#downcase.

Related: Symbol#upcase.

Equivalent to sym.to_s.swapcase.to_sym.

See String#swapcase.

No documentation available

Enters exclusive section.

Enters exclusive section and executes the block. Leaves the exclusive section automatically when the block exits. See example under MonitorMixin.

The opposite of Pathname#absolute?

It returns false if the pathname begins with a slash.

p = Pathname.new('/im/sure')
p.relative?
    #=> false

p = Pathname.new('not/so/sure')
p.relative?
    #=> true

Creates a full path, including any intermediate directories that don’t yet exist.

See FileUtils.mkpath and FileUtils.mkdir_p

Returns the real (absolute) pathname for self in the actual filesystem.

Does not contain symlinks or useless dots, .. and ..

All components of the pathname must exist when this method is called.

Returns the real (absolute) pathname of self in the actual filesystem.

Does not contain symlinks or useless dots, .. and ..

The last component of the real pathname can be nonexistent.

See IO.sysopen.

Returns the last access time for the file.

See File.atime.

Returns the birth time for the file. If the platform doesn’t have birthtime, raises NotImplementedError.

See File.birthtime.

Returns the last change time, using directory information, not the file itself.

See File.ctime.

Returns the last modified time of the file.

See File.mtime.

Opens the file for reading or writing.

See File.open.

Update the access and modification times of the file.

See File.utime.

Update the access and modification times of the file.

Same as Pathname#utime, but does not follow symbolic links.

See File.lutime.

Returns the last component of the path.

See File.basename.

See FileTest.chardev?.

See FileTest.setuid?.

Search took: 4ms  ·  Total Results: 3694