From b4c2bfe0f92b1695b7bf40d45c1724c278b463f1 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Mon, 19 Apr 2010 01:52:57 -0400 Subject: [PATCH] Cleaning up the Net::BER core extension docs. --- lib/net/ber/core_ext.rb | 51 +++++++++++------------------ lib/net/ber/core_ext/array.rb | 2 ++ lib/net/ber/core_ext/bignum.rb | 2 ++ lib/net/ber/core_ext/false_class.rb | 2 ++ lib/net/ber/core_ext/fixnum.rb | 2 ++ lib/net/ber/core_ext/string.rb | 2 ++ lib/net/ber/core_ext/true_class.rb | 2 ++ 7 files changed, 32 insertions(+), 31 deletions(-) diff --git a/lib/net/ber/core_ext.rb b/lib/net/ber/core_ext.rb index 94da38e..6acc35f 100644 --- a/lib/net/ber/core_ext.rb +++ b/lib/net/ber/core_ext.rb @@ -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: diff --git a/lib/net/ber/core_ext/array.rb b/lib/net/ber/core_ext/array.rb index 4696a5a..fef386b 100644 --- a/lib/net/ber/core_ext/array.rb +++ b/lib/net/ber/core_ext/array.rb @@ -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 diff --git a/lib/net/ber/core_ext/bignum.rb b/lib/net/ber/core_ext/bignum.rb index b1d9a6f..c2a0f03 100644 --- a/lib/net/ber/core_ext/bignum.rb +++ b/lib/net/ber/core_ext/bignum.rb @@ -1,3 +1,5 @@ +## +# BER extensions to the Bignum class. module Net::BER::Extensions::Bignum ## # Converts a Bignum to an uncompressed BER integer. diff --git a/lib/net/ber/core_ext/false_class.rb b/lib/net/ber/core_ext/false_class.rb index bdbbca9..2de15dc 100644 --- a/lib/net/ber/core_ext/false_class.rb +++ b/lib/net/ber/core_ext/false_class.rb @@ -1,3 +1,5 @@ +## +# BER extensions to +false+. module Net::BER::Extensions::FalseClass ## # Converts +false+ to the BER wireline representation of +false+. diff --git a/lib/net/ber/core_ext/fixnum.rb b/lib/net/ber/core_ext/fixnum.rb index 5d16354..7409ed1 100644 --- a/lib/net/ber/core_ext/fixnum.rb +++ b/lib/net/ber/core_ext/fixnum.rb @@ -1,3 +1,5 @@ +## +# Ber extensions to the Fixnum class. module Net::BER::Extensions::Fixnum ## # Converts the fixnum to BER format. diff --git a/lib/net/ber/core_ext/string.rb b/lib/net/ber/core_ext/string.rb index c0c42c5..1835d9f 100644 --- a/lib/net/ber/core_ext/string.rb +++ b/lib/net/ber/core_ext/string.rb @@ -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 diff --git a/lib/net/ber/core_ext/true_class.rb b/lib/net/ber/core_ext/true_class.rb index 16ef9da..53975b1 100644 --- a/lib/net/ber/core_ext/true_class.rb +++ b/lib/net/ber/core_ext/true_class.rb @@ -1,3 +1,5 @@ +## +# BER extensions to +true+. module Net::BER::Extensions::TrueClass ## # Converts +true+ to the BER wireline representation of +true+.