Results for: "module_function"

Returns a hash, that will be turned into a JSON object and represent this object.

Stores class name (Complex) along with real value r and imaginary value i as JSON string

Try to convert obj into a String, using to_str method. Returns converted string or nil if obj cannot be converted for any reason.

String.try_convert("str")     #=> "str"
String.try_convert(/re/)      #=> nil

Replaces the contents and taintedness of str with the corresponding values in other_str.

s = "hello"         #=> "hello"
s.replace "world"   #=> "world"

Returns true for a string which has only ASCII characters.

"abc".force_encoding("UTF-8").ascii_only?          #=> true
"abc\u{6666}".force_encoding("UTF-8").ascii_only?  #=> false

Iterates the given block for each element with an arbitrary object, obj, and returns obj

If no block is given, returns a new Enumerator.

Example

to_three = Enumerator.new do |y|
  3.times do |x|
    y << x
  end
end

to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
  puts "#{string}: #{x}"
end

# => foo:0
# => foo:1
# => foo:2

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

Returns a hash, that will be turned into a JSON object and represent this object.

Stores class name (Exception) with message m and backtrace array b as JSON string

Import a JSON Marshalled object.

method used for JSON marshalling support.

Marshal the object to JSON.

method used for JSON marshalling support.

return the JSON value

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

Returns a hash, that will be turned into a JSON object and represent this object.

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

No documentation available

Returns a Time object which denotes 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 hash, that will be turned into a JSON object and represent this object.

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 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 hash, that will be turned into a JSON object and represent this object.

Search took: 7ms  ·  Total Results: 3710