diff options
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r-- | lib/net/protocol.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index fd85771dd5..c4dcce9e44 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -24,6 +24,17 @@ require 'timeout' module Net + class Protocol + private + def Protocol.protocol_param( name, val ) + module_eval(<<-End, __FILE__, __LINE__ + 1) + def #{name} + #{val} + end + End + end + end + class ProtocolError < StandardError; end class ProtoSyntaxError < ProtocolError; end class ProtoFatalError < ProtocolError; end |