Results for: "gsub"

An error caused by searching for a dependency that is completely unknown, i.e. has no versions available whatsoever.

Performs the specified substring replacement(s) on self; returns self if any replacement occurred, nil otherwise.

See Substitution Methods.

Returns an Enumerator if no replacement and no block given.

Related: String#sub, String#gsub, String#sub!.

Returns a copy of self with only the first occurrence (not all occurrences) of the given pattern replaced.

See Substitution Methods.

Related: String#sub!, String#gsub, String#gsub!.

Returns self with only the first occurrence (not all occurrences) of the given pattern replaced.

See Substitution Methods.

Related: String#sub, String#gsub, String#gsub!.

Subtract the specified value.

e.g.

c = a.sub(b,n)
digits

If specified and less than the number of significant digits of the result, the result is rounded to that number of digits, according to BigDecimal.mode.

Returns the subsecond for time.

The return value can be a rational number.

t = Time.now        #=> 2020-07-20 15:40:26.867462289 +0900
t.subsec            #=> (867462289/1000000000)

t = Time.now        #=> 2020-07-20 15:40:50.313828595 +0900
t.subsec            #=> (62765719/200000000)

t = Time.new(2000,1,1,2,3,4) #=> 2000-01-01 02:03:04 +0900
t.subsec                     #=> 0

Time.new(2000,1,1,0,0,1/3r,"UTC").subsec #=> (1/3)

Returns true if the set is a subset of the given set.

Deletes every element that appears in the given enumerable object and returns self.

Returns an array of classes where the receiver is the direct superclass of the class, excluding singleton classes. The order of the returned array is not defined.

class A; end
class B < A; end
class C < B; end
class D < A; end

A.subclasses        #=> [D, B]
B.subclasses        #=> [C]
C.subclasses        #=> []

Return a pathname which is substituted by String#sub.

path1 = Pathname.new('/usr/bin/perl')
path1.sub('perl', 'ruby')
    #=> #<Pathname:/usr/bin/ruby>

Equivalent to $_.sub(args), except that $_ will be updated if substitution occurs. Available only when -p/-n command line option specified.

Quietly ensure the Gem directory dir contains all the proper subdirectories. If we can’t create a directory due to a permission problem, then we will silently continue.

If mode is given, missing directories are created with this mode.

World-writable directories will never be created.

Quietly ensure the Gem directory dir contains all the proper subdirectories for handling default gems. If we can’t create a directory due to a permission problem, then we will silently continue.

If mode is given, missing directories are created with this mode.

World-writable directories will never be created.

Returns true if the set is a proper subset of the given set.

Return a pathname with repl added as a suffix to the basename.

If self has no extension part, repl is appended.

Pathname.new('/usr/bin/shutdown').sub_ext('.rb')
    #=> #<Pathname:/usr/bin/shutdown.rb>

Takes a block and queues a new group that is indented 1 level further.

Generate a submit button Input element, as a String.

value is the text to display on the button. name is the name of the input.

Alternatively, the attributes can be specified as a hash.

submit
  # <INPUT TYPE="submit">

submit("ok")
  # <INPUT TYPE="submit" VALUE="ok">

submit("ok", "button1")
  # <INPUT TYPE="submit" VALUE="ok" NAME="button1">

submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo")
  # <INPUT TYPE="submit" VALUE="ok" NAME="button1" ID="foo">
No documentation available

Returns a content type string such as “html”. This method returns nil if Content-Type: header field does not exist or sub-type is not given (e.g. “Content-Type: text”).

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