Class: TextFile
Instance Attribute Summary
Attributes inherited from DOSFile
#contents, #filename, #locked, #sector_count
Instance Method Summary
collapse
Methods inherited from DOSFile
#hex_dump, #initialize
Constructor Details
This class inherits a constructor from DOSFile
Instance Method Details
#file_extension ⇒ Object
51
52
53
|
# File 'lib/DOSFile.rb', line 51
def file_extension
".txt"
end
|
#file_type ⇒ Object
47
48
49
|
# File 'lib/DOSFile.rb', line 47
def file_type
"T"
end
|
#to_s ⇒ Object
55
56
57
58
59
|
# File 'lib/DOSFile.rb', line 55
def to_s
s=""
@contents.each_byte{|b| s+=(b%0x80).chr.tr(0x0D.chr,"\n")}
s
end
|