#--
-# $Id: eet.rb 59 2005-06-08 16:13:15Z 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
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 String # :nodoc:
def to_eet_chunks(tag, type = nil)
[Eet::Chunk.new(tag, self + "\0")]
class ChunkError < EetError; end
+ class File
+ def list(glob = "*")
+ warn "Eet::File#list is deprecated, " +
+ "use Eet::File#entries or Eet::File#[] instead"
+
+ self[glob]
+ end
+ end
+
class Stream # :nodoc:
def initialize(chunk = nil)
super(chunk.nil? ? 0 : 1, chunk)