X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=lib%2Feet.rb;h=ca2815c7bbb15b4ea2b434c734b3ff05ab43ebca;hb=acac7cddaa36d56b0d2cb89291a7d37228e2aaf0;hp=d178e237c35c69b85f5b91eb7ad5ca45aefd322f;hpb=4c7878f377ebdbd92914b94aa9bb0c20bfa0505f;p=ruby-eet.git diff --git a/lib/eet.rb b/lib/eet.rb index d178e23..ca2815c 100644 --- a/lib/eet.rb +++ b/lib/eet.rb @@ -1,7 +1,5 @@ #-- -# $Id: eet.rb 53 2005-06-02 20:01:45Z tilman $ -# -# Copyright (c) 2005 Tilman Sauerbeck (tilman at code-monkey de) +# Copyright (c) 2005-2007 Tilman Sauerbeck (tilman at code-monkey de) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -56,32 +54,6 @@ class Object end end -class Integer # :nodoc: - def to_eet_chunks(tag, type = nil) - fmt = case type - when :char: "c" - when :short: "v" - when :long_long: "q" - else "V" - end - - data = [self].pack(fmt) - [Eet::Chunk.new(tag, data)] - end -end - -class Float # :nodoc: - def to_eet_chunks(tag, type = nil) - fmt = case type - when :double: "%32.32f" - else "%16.16f" - end - - data = fmt % self - [Eet::Chunk.new(tag, data + "\0")] - end -end - class String # :nodoc: def to_eet_chunks(tag, type = nil) [Eet::Chunk.new(tag, self + "\0")]