Method: WorldDb::ReaderBaseWithMoreAttribs.from_file

Defined in:
lib/worlddb/readers/base.rb

.from_file(path, more_attribs = {}) ⇒ Object



52
53
54
55
56
57
# File 'lib/worlddb/readers/base.rb', line 52

def self.from_file( path, more_attribs={} )
  ## note: assume/enfore utf-8 encoding (with or without BOM - byte order mark)
  ## - see textutils/utils.rb
  text = File.read_utf8( path )
  self.from_string( text, more_attribs )
end