Class: File

Inherits:
Object
  • Object
show all
Defined in:
lib/hoe.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.read_utf(path) ⇒ Object

Like File::read, but strips out a BOM marker if it exists.



981
982
983
984
985
# File 'lib/hoe.rb', line 981

def self.read_utf path
  open path, "r:bom|utf-8" do |f|
    f.read
  end
end