Class: File
- Inherits:
-
Object
- Object
- File
- Defined in:
- lib/hoe.rb
Class Method Summary (collapse)
-
+ (Object) read_utf(path)
Like File::read, but strips out a BOM marker if it exists.
Class Method Details
+ (Object) read_utf(path)
Like File::read, but strips out a BOM marker if it exists.
682 683 684 685 686 |
# File 'lib/hoe.rb', line 682 def self.read_utf path open path, 'rb' do |f| f.read.sub %r/\A\xEF\xBB\xBF/, '' end end |