class Gherkin::TokenScanner
def initialize(source_or_io)
def initialize(source_or_io) @line_number = 0 case(source_or_io) when String @io = StringIO.new(source_or_io) when StringIO, IO @io = source_or_io else fail ArgumentError, "Please a pass String, StringIO or IO. I got a #{source_or_io.class}" end end