Class: Cambridge::Scanner

Inherits:
Object
  • Object
show all
Defined in:
lib/cambridge/scanner.rb

Instance Method Summary collapse

Constructor Details

#initializeScanner

Returns a new instance of Scanner.



4
5
6
# File 'lib/cambridge/scanner.rb', line 4

def initialize
  @parser = Parser::Scan.new
end

Instance Method Details

#parse(line) ⇒ Object



8
9
10
11
# File 'lib/cambridge/scanner.rb', line 8

def parse(line)
  @line = line
  @parser.parse @line
end