Results for: "remove_const"

Mounts servlet on dir passing options to the servlet at creation time

Unmounts dir

No documentation available

Converts the contents of the database to an in-memory Hash, then calls Hash#reject with the specified code block, returning a new Hash.

Returns a Hash (not a DBM database) created by using each value in the database as a key, with the corresponding key as its value.

Note that all values in the hash will be Strings, but the keys will be actual objects.

Replaces the contents of the database with the contents of the specified object. Takes any object which implements the each_pair method, including Hash and DBM objects.

Resets the digest to the initial state and returns self.

This method is overridden by each implementation subclass.

Construct a new class given a C:

Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an easy-to-use manner.

Example:

require 'fiddle/struct'
require 'fiddle/cparser'

include Fiddle::CParser

types, members = parse_struct_signature(['int i','char c'])

MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)

obj = MyStruct.allocate

Construct a new class given a C:

Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an easy-to-use manner.

Example:

require 'fiddle/struct'
require 'fiddle/cparser'

include Fiddle::CParser

types, members = parse_struct_signature(['int i','char c'])

MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)

obj = MyStruct.allocate

See IO#readchar.

See IO#readbyte.

See IO#readline.

Similar to read, but raises EOFError at end of string instead of returning nil, as well as IO#sysread does.

Similar to read, but raises EOFError at end of string instead of returning nil, as well as IO#sysread does.

Reads size bytes from the stream. If buf is provided it must reference a string which will receive the data.

See IO#read for full details.

Reads at most maxlen bytes from the stream. If buf is provided it must reference a string which will receive the data.

See IO#readpartial for full details.

Reads lines from the stream which are separated by eol.

See also gets

Reads a line from the stream which is separated by eol.

Raises EOFError if at end of file.

Reads a one-character string from the stream. Raises an EOFError at end of file.

Reads a DER or PEM encoded string from string or io and returns an instance of the appropriate PKey class.

Parameters

If a block is given, it prints out each of the elements encountered. Block parameters are (in that order):

Example

der = File.binread('asn1data.der')
OpenSSL::ASN1.traverse(der) do | depth, offset, header_len, length, constructed, tag_class, tag|
  puts "Depth: #{depth} Offset: #{offset} Length: #{length}"
  puts "Header length: #{header_len} Tag: #{tag} Tag class: #{tag_class} Constructed: #{constructed}"
end

Returns a profile data report such as:

GC 1 invokes.
Index    Invoke Time(sec)       Use Size(byte)     Total Size(byte)         Total Object                    GC time(ms)
    1               0.012               159240               212940                10647         0.00000000000001530000

Writes the GC::Profiler.result to $stdout or the given IO object.

Escape only the tags of certain HTML elements in string.

Takes an element or elements or array of elements. Each element is specified by the name of the element, without angle brackets. This matches both the start and the end tag of that element. The attribute list of the open tag will also be escaped (for instance, the double-quotes surrounding attribute values).

print CGI::escapeElement('<BR><A HREF="url"></A>', "A", "IMG")
  # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"

print CGI::escapeElement('<BR><A HREF="url"></A>', ["A", "IMG"])
  # "<BR>&lt;A HREF=&quot;url&quot;&gt;&lt;/A&gt"

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>"
Search took: 7ms  ·  Total Results: 3851