Object
# File lib/whois/record/scanners/base.rb, line 30 def parse(content) # The temporary store. # Scanners may use this to store pointers, states or other flags. @tmp = {} # A super-simple AST store. @ast = {} @input = StringScanner.new(content) tokenize until @input.eos? @ast end
# File lib/whois/record/scanners/base.rb, line 92 def _scan_keyvalues(pattern) results = [] while @input.scan(/(.+?):(.*?)\n/) key, value = @input[1].strip, @input[2].strip if results[key].nil? results[key] = value else results[key] = Array.wrap(results[key]) results[key] << value end end end
Generated with the Darkfish Rdoc Generator 2.