Results for: "fnmatch"

Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point. If the given pathname starts with a “~” it is NOT expanded, it is treated as a normal directory name.

File.absolute_path("~oracle/bin")       #=> "<relative_path>/~oracle/bin"

Returns the pathname used to create file as a string. Does not normalize the name.

File.new("testfile").path               #=> "testfile"
File.new("/tmp/../tmp/xxx", "w").path   #=> "/tmp/../tmp/xxx"

Returns whether ASCII-compatible or not.

Encoding::UTF_8.ascii_compatible?     #=> true
Encoding::UTF_16BE.ascii_compatible?  #=> false

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 any backtrace associated with the exception. This method is similar to Exception#backtrace, but the backtrace is an array of

Thread::Backtrace::Location.

Now, this method is not affected by Exception#set_backtrace().

Deserializes JSON string by constructing new Exception object with message m and backtrace b serialized with to_json

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 instance variables and corresponding methods that return the value of each instance variable. Equivalent to calling “attr:name” on each name in turn. String arguments are converted to symbols.

Creates an accessor method to allow assignment to the attribute symbol.id2name. String arguments are converted to symbols.

Defines a named attribute for this module, where the name is symbol.id2name, creating an instance variable (@name) and a corresponding access method to read it. Also creates a method called name= to set the attribute. String arguments are converted to symbols.

module Mod
  attr_accessor(:one, :two)
end
Mod.instance_methods.sort   #=> [:one, :one=, :two, :two=]

Makes a list of existing constants private.

No documentation available

Import a JSON Marshalled object.

method used for JSON marshalling support.

Iterates the given block over all prime numbers.

See Prime#each for more details.

Deserializes JSON string by converting numerator value n, denominator value d, to a Rational object.

Returns true if the given calendar date is valid, and false if not.

Date.valid_date?(2001,2,3)        #=> true
Date.valid_date?(2001,2,29)       #=> false

See also jd and civil.

Returns self;

Returns a DateTime object which denotes self.

Deserializes JSON string by converting Julian year y, month m, day d and Day of Calendar Reform sg to Date.

Returns a Date object which denotes self.

Returns self.

Deserializes JSON string by converting year y, month m, day d, hour H, minute M, second S, offset of and Day of Calendar Reform sg to DateTime.

Returns a Date object which denotes self.

Returns a DateTime object which denotes self.

Search took: 5ms  ·  Total Results: 2025