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



7
8
9
10
11
12
# File 'lib/utils/file.rb', line 7

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