Cleaning up the Net::BER core extension docs.

This commit is contained in:
Austin Ziegler 2010-04-19 01:52:57 -04:00
parent 64bcdd0912
commit b4c2bfe0f9
7 changed files with 32 additions and 31 deletions

View file

@ -1,29 +1,5 @@
# NET::BER
# Mixes ASN.1/BER convenience methods into several standard classes. Also
# provides BER parsing functionality.
#
#--
# Copyright (C) 2006 by Francis Cianfrocca and other contributors. All
# Rights Reserved.
#
# Gmail: garbagecat10
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#++
require 'net/ber/ber_parser'
# :stopdoc:
class IO
include Net::BER::BERParser
end
@ -37,36 +13,49 @@ if defined? ::OpenSSL
include Net::BER::BERParser
end
end
# :startdoc:
module Net::BER::Extensions; end
module Net::BER::Extensions # :nodoc:
end
require 'net/ber/core_ext/string'
# :stopdoc:
class String
include Net::BER::BERParser
include Net::BER::Extensions::String
end
require 'net/ber/core_ext/array'
class Array
# :stopdoc:
class Array
include Net::BER::Extensions::Array
end
# :startdoc:
require 'net/ber/core_ext/bignum'
class Bignum
# :stopdoc:
class Bignum
include Net::BER::Extensions::Bignum
end
# :startdoc:
require 'net/ber/core_ext/fixnum'
class Fixnum
# :stopdoc:
class Fixnum
include Net::BER::Extensions::Fixnum
end
# :startdoc:
require 'net/ber/core_ext/true_class'
class TrueClass
# :stopdoc:
class TrueClass
include Net::BER::Extensions::TrueClass
end
# :startdoc:
require 'net/ber/core_ext/false_class'
class FalseClass
# :stopdoc:
class FalseClass
include Net::BER::Extensions::FalseClass
end
# :startdoc:

View file

@ -1,3 +1,5 @@
##
# BER extensions to the Array class.
module Net::BER::Extensions::Array
##
# Converts an Array to a BER sequence. All values in the Array are

View file

@ -1,3 +1,5 @@
##
# BER extensions to the Bignum class.
module Net::BER::Extensions::Bignum
##
# Converts a Bignum to an uncompressed BER integer.

View file

@ -1,3 +1,5 @@
##
# BER extensions to +false+.
module Net::BER::Extensions::FalseClass
##
# Converts +false+ to the BER wireline representation of +false+.

View file

@ -1,3 +1,5 @@
##
# Ber extensions to the Fixnum class.
module Net::BER::Extensions::Fixnum
##
# Converts the fixnum to BER format.

View file

@ -1,5 +1,7 @@
require 'stringio'
##
# BER extensions to the String class.
module Net::BER::Extensions::String
##
# Converts a string to a BER string. Universal octet-strings are tagged

View file

@ -1,3 +1,5 @@
##
# BER extensions to +true+.
module Net::BER::Extensions::TrueClass
##
# Converts +true+ to the BER wireline representation of +true+.