Returns a Time
object which denotes self. If self is a julian date, convert it to a gregorian date before converting it to Time
.
Returns self.
Returns a DateTime
object which denotes self.
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
.
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.
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.
In general, to_sym
returns the Symbol
corresponding to an object. As sym is already a symbol, self
is returned in this case.
Return the path as a String
.
to_path
is implemented so Pathname
objects are usable with File.open
, etc.
creates a socket connected to remote_addr_args and bound to self.
The optional last argument opts is options represented by a hash. opts may have following options:
specify the timeout in seconds.
If a block is given, it is called with the socket and the value of the block is returned. The socket is returned otherwise.
Addrinfo.tcp("0.0.0.0", 4649).connect_to("www.ruby-lang.org", 80) {|s| s.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n" puts s.read }
Returns self
.