Class: Datafile::ZipPackage::Entry
- Inherits:
-
Object
- Object
- Datafile::ZipPackage::Entry
- Defined in:
- lib/sportdb/formats/datafile_package.rb
Instance Method Summary collapse
-
#initialize(pack, entry) ⇒ Entry
constructor
A new instance of Entry.
- #name ⇒ Object
- #read ⇒ Object
Constructor Details
#initialize(pack, entry) ⇒ Entry
Returns a new instance of Entry.
74 75 76 77 |
# File 'lib/sportdb/formats/datafile_package.rb', line 74 def initialize( pack, entry ) @pack = pack @entry = entry end |
Instance Method Details
#name ⇒ Object
79 |
# File 'lib/sportdb/formats/datafile_package.rb', line 79 def name() @entry.name; end |
#read ⇒ Object
80 81 82 83 84 85 |
# File 'lib/sportdb/formats/datafile_package.rb', line 80 def read txt = @entry.get_input_stream.read ## puts "** encoding: #{txt.encoding}" #=> encoding: ASCII-8BIT txt = txt.force_encoding( Encoding::UTF_8 ) txt end |