Results for: "gsub"

Returns the successor to the ipaddr.

Puts option summary into to and returns to. Yields each line if a block is given.

to

Output destination, which must have method <<. Defaults to [].

width

Width of left side, defaults to @summary_width.

max

Maximum length allowed for left side, defaults to width - 1.

indent

Indentation, defaults to @summary_indent.

Returns the superclass of class, or nil.

File.superclass          #=> IO
IO.superclass            #=> Object
Object.superclass        #=> BasicObject
class Foo; end
class Bar < Foo; end
Bar.superclass           #=> Foo

Returns nil when the given class does not have a parent class:

BasicObject.superclass   #=> nil

With no block given, returns the sum of initial_value and the elements:

(1..100).sum          # => 5050
(1..100).sum(1)       # => 5051
('a'..'d').sum('foo') # => "fooabcd"

Generally, the sum is computed using methods + and each; for performance optimizations, those methods may not be used, and so any redefinition of those methods may not have effect here.

One such optimization: When possible, computes using Gauss’s summation formula n(n+1)/2:

100 * (100 + 1) / 2 # => 5050

With a block given, calls the block with each element; returns the sum of initial_value and the block return values:

(1..4).sum {|i| i*i }                        # => 30
(1..4).sum(100) {|i| i*i }                   # => 130
h = {a: 0, b: 1, c: 2, d: 3, e: 4, f: 5}
h.sum {|key, value| value.odd? ? value : 0 } # => 9
('a'..'f').sum('x') {|c| c < 'd' ? c : '' }  # => "xabc"

Returns true if coverage measurement is supported for the given mode.

The mode should be one of the following symbols: :lines, :oneshot_lines, :branches, :methods, :eval.

Example:

Coverage.supported?(:lines)  #=> true
Coverage.supported?(:all)    #=> false

Start/resume the coverage measurement.

Caveat: Currently, only process-global coverage measurement is supported. You cannot measure per-thread coverage. If your process has multiple thread, using Coverage.resume/suspend to capture code coverage executed from only a limited code block, may yield misleading results.

Suspend the coverage measurement. You can use Coverage.resume to restart the measurement.

Returns a hash that contains filename as key and coverage array as value. If clear is true, it clears the counters to zero. If stop is true, it disables coverage measurement.

Returns a BubbleBabble encoded version of a given string.

The path to the running Ruby interpreter.

Suffixes for require-able paths.

No documentation available
No documentation available

Returns the BubbleBabble encoded hash value of a given string.

Returns the flags of ifaddr.

The value is bitwise-or of Socket::IFF_* constants such as Socket::IFF_LOOPBACK.

Returns true if there were no errors during parsing and false if there were.

Whether this specification is stubbed - i.e. we have information about the gem from a stub line, without having to evaluate the entire gemspec file.

Returns a Gem::StubSpecification for every installed gem

A short summary of this gem’s description.

No documentation available

Returns a Gem::StubSpecification for every specification in the record

No documentation available

Returns:

Returns the resulting hash value in a Bubblebabble encoded form.

No documentation available
Search took: 3ms  ·  Total Results: 286