Results for: "to_proc"

return the JSON value

Stores class name (Rational) along with numerator value n and denominator value d as JSON string

Returns a new Time object with the same value as self; if self is a Julian date, derives its Gregorian date for conversion to the Time object:

Date.new(2001, 2, 3).to_time               # => 2001-02-03 00:00:00 -0600
Date.new(2001, 2, 3, Date::JULIAN).to_time # => 2001-02-16 00:00:00 -0600

Returns self.

Returns a DateTime whose value is the same as self:

Date.new(2001, 2, 3).to_datetime # => #<DateTime: 2001-02-03T00:00:00+00:00>

Stores class name (Date) with Julian year y, month m, day d and Day of Calendar Reform sg as JSON string

Returns a Time object which denotes self.

Returns a Date object which denotes self.

Returns self.

Stores class name (DateTime) with Julian year y, month m, day d, hour H, minute M, second S, offset of and Day of Calendar Reform sg as JSON string

Returns self.

Returns a Date object which denotes self.

Returns a DateTime object which denotes self.

Stores class name (Time) with number of seconds since epoch and number of microseconds for Time as JSON string

Returns self.

Returns the path associated with the IO, or nil if there is no path associated with the IO. It is not guaranteed that the path exists on the filesystem.

$stdin.path # => "<STDIN>"

File.open("testfile") {|f| f.path} # => "testfile"

Stores class name (OpenStruct) with this struct’s values t as a JSON string.

Stores class name (Range) with JSON array of arguments a which include first (integer), last (integer), and exclude_end? (boolean) as JSON string.

Stores class name (Regexp) with options o and source s (Regexp or String) as JSON string

return the JSON value

Returns self if no arguments are given. Otherwise, converts the set to another with klass.new(self, *args, &block).

In subclasses, returns klass.new(self, *args, &block) unless overridden.

Stores class name (Struct) with Struct values v as a JSON string. Only named structs are supported.

Stores class name (Symbol) with String representation of Symbol as a JSON string.

Returns self.

Symbol#intern is an alias for Symbol#to_sym.

Related: String#to_sym.

Return the path as a String.

to_path is implemented so Pathname objects are usable with File.open, etc.

Search took: 1ms  ·  Total Results: 1731