Results for: "module_function"

If a block is provided, returns a new array containing [key, value] pairs for which the block returns true.

Otherwise, same as values_at

Undo escaping such as that done by CGI.escapeElement()

print CGI.unescapeElement(
        CGI.escapeHTML('<BR><A HREF="url"></A>'), "A", "IMG")
  # "&lt;BR&gt;<A HREF="url"></A>"

print CGI.unescapeElement(
        CGI.escapeHTML('<BR><A HREF="url"></A>'), ["A", "IMG"])
  # "&lt;BR&gt;<A HREF="url"></A>"

Returns whether the form contained multipart/form-data

Create a new BackReferenceReadNode node

Create a new ConstantAndWriteNode node

Create a new ConstantOperatorWriteNode node

Create a new ConstantOrWriteNode node

Create a new ConstantPathAndWriteNode node

Create a new ConstantPathNode node

Create a new ConstantPathOperatorWriteNode node

Create a new ConstantPathOrWriteNode node

Create a new ConstantPathTargetNode node

Create a new ConstantPathWriteNode node

Create a new ConstantReadNode node

Create a new ConstantTargetNode node

Create a new ConstantWriteNode node

Create a new NumberedReferenceReadNode node

Create a new RedoNode node

Create a new UndefNode node

Compile a InterpolatedRegularExpressionNode node

Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue walking the tree.

Copy a InterpolatedRegularExpressionNode node

Changes the encoding of self to encoding, which may be a string encoding name or an Encoding object; returns self:

s = 'łał'
s.bytes                   # => [197, 130, 97, 197, 130]
s.encoding                # => #<Encoding:UTF-8>
s.force_encoding('ascii') # => "\xC5\x82a\xC5\x82"
s.encoding                # => #<Encoding:US-ASCII>

Does not change the underlying bytes:

s.bytes                   # => [197, 130, 97, 197, 130]

Makes the change even if the given encoding is invalid for self (as is the change above):

s.valid_encoding?                 # => false
s.force_encoding(Encoding::UTF_8) # => "łał"
s.valid_encoding?                 # => true

Returns true if self is encoded correctly, false otherwise:

"\xc2\xa1".force_encoding("UTF-8").valid_encoding? # => true
"\xc2".force_encoding("UTF-8").valid_encoding?     # => false
"\x80".force_encoding("UTF-8").valid_encoding?     # => false

Returns a copy of self with Unicode normalization applied.

Argument form must be one of the following symbols (see Unicode normalization forms):

The encoding of self must be one of:

Examples:

"a\u0300".unicode_normalize      # => "a"
"\u00E0".unicode_normalize(:nfd) # => "a "

Related: String#unicode_normalize!, String#unicode_normalized?.

Search took: 4ms  ·  Total Results: 4789