Method: Glyph::Utils#file_load
- Defined in:
- lib/glyph/utils.rb
permalink #file_load(file) ⇒ String
Loads the contents of a file
54 55 56 57 58 59 60 61 62 |
# File 'lib/glyph/utils.rb', line 54 def file_load(file) result = "" File.open(file.to_s, 'r:utf-8') do |f| while l = f.gets result << l end end result end |