Net::LDAP::Extensions::String

Public Instance Methods

read_ber(syntax=nil) click to toggle source
    # File lib/net/ldap/core_ext/string.rb, line 33
33:         def read_ber syntax=nil
34:           StringIO.new(self).
35:             read_ber(syntax)
36:         end
to_ber(code = 4) click to toggle source

to_ber A universal octet-string is tag number 4, but others are possible depending on the context, so we let the caller give us one. The preferred way to do this in user code is via to_ber_application_sring and to_ber_contextspecific.

    # File lib/net/ldap/core_ext/string.rb, line 15
15:         def to_ber code = 4
16:           [code].pack('C') + length.to_ber_length_encoding + self
17:         end
to_ber_application_string(code) click to toggle source

to_ber_application_string

    # File lib/net/ldap/core_ext/string.rb, line 22
22:         def to_ber_application_string code
23:           to_ber( 0x40 + code )
24:         end
to_ber_contextspecific(code) click to toggle source

to_ber_contextspecific

    # File lib/net/ldap/core_ext/string.rb, line 29
29:         def to_ber_contextspecific code
30:           to_ber( 0x80 + code )
31:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.