Results for: "Logger"

Returns true if the named file exists and has a zero size.

file_name can be an IO object.

Returns true if filepath points to a block device, false otherwise:

File.blockdev?('/dev/sda1')       # => true
File.blockdev?(File.new('t.tmp')) # => false

Returns the currently set formatter. By default, it is set to DidYouMean::Formatter.

Updates the primary formatter used to format the suggestions.

Is uri the URI for the current local server?

Is uri the URI for the current local server?

No documentation available
No documentation available
No documentation available
No documentation available

Set the changed state of this object. Notifications will be sent only if the changed state is true.

state

Boolean indicating the changed state of this Observable.

Returns true if this object’s state has been changed since the last notify_observers call.

Load the serialized AST using the source as a reference into a tree.

No documentation available
No documentation available

Raises a TypeError to prevent cloning.

By default calls instance(). Override to retain singleton state.

Returns the result of converting the serialized data in source into a Ruby object (possibly with associated subordinate objects). source may be either an instance of IO or an object that responds to to_str. If proc is specified, each object will be passed to the proc, as the object is being deserialized.

Never pass untrusted data (including user supplied input) to this method. Please see the overview for further details.

If the freeze: true argument is passed, deserialized object would be deeply frozen. Note that it may lead to more efficient memory usage due to frozen strings deduplication:

serialized = Marshal.dump(['value1', 'value2', 'value1', 'value2'])

deserialized = Marshal.load(serialized)
deserialized.map(&:frozen?)
# => [false, false, false, false]
deserialized.map(&:object_id)
# => [1023900, 1023920, 1023940, 1023960] -- 4 different objects

deserialized = Marshal.load(serialized, freeze: true)
deserialized.map(&:frozen?)
# => [true, true, true, true]
deserialized.map(&:object_id)
# => [1039360, 1039380, 1039360, 1039380] -- only 2 different objects, object_ids repeating

Returns the value of the Gauss error function for x.

Examples:

erf(-INFINITY) # => -1.0
erf(0.0)       # => 0.0
erf(INFINITY)  # => 1.0

Related: Math.erfc.

Returns the value of the complementary error function for x.

Examples:

erfc(-INFINITY) # => 2.0
erfc(0.0)       # => 1.0
erfc(INFINITY)  # => 0.0

Related: Math.erf.

Returns the process group ID for the current process:

Process.getpgid(0) # => 25527
Process.getpgrp    # => 25527
Returns the process group ID for the given process ID +pid+:

  Process.getpgid(Process.ppid) # => 25527

Not available on all platforms.

Returns the session ID of the given process ID pid, or of the current process if not given:

Process.getsid                # => 27422
Process.getsid(0)             # => 27422
Process.getsid(Process.pid()) # => 27422

Not available on all platforms.

Returns the scheduling priority for specified process, process group, or user.

Argument kind is one of:

Argument id is the ID for the process, process group, or user; zero specified the current ID for kind.

Examples:

Process.getpriority(Process::PRIO_USER, 0)    # => 19
Process.getpriority(Process::PRIO_PROCESS, 0) # => 19

Not available on all platforms.

Returns a 2-element array of the current (soft) limit and maximum (hard) limit for the given resource.

Argument resource specifies the resource whose limits are to be returned; see Process.setrlimit.

Each of the returned values cur_limit and max_limit is an integer; see Process.setrlimit.

Example:

Process.getrlimit(:CORE) # => [0, 18446744073709551615]

See Process.setrlimit.

Not available on all platforms.

Search took: 3ms  ·  Total Results: 2737