Parent

Methods

Gherkin::Lexer::Encoding

Public Instance Methods

read_file(path) click to toggle source
# File lib/gherkin/lexer/encoding.rb, line 9
def read_file(path)
  source = File.new(path).read
  enc = encoding(source)
  if(enc != 'UTF-8')
    # Read it again with different encoding
    source = File.new(path, "r:#{enc}:UTF-8").read
  end
  source
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.