Class: EllipticCurve::Utils::File

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

Class Method Summary collapse

Class Method Details

.read(path, encoding = "ASCII") ⇒ Object



4
5
6
7
8
9
# File 'lib/utils/file.rb', line 4

def self.read(path, encoding="ASCII")
    file = ::File.open(path, :encoding => encoding.upcase)
    content = file.read
    file.close
    content
end