Class: Bibtex::Parser
- Inherits:
-
Object
- Object
- Bibtex::Parser
- Defined in:
- lib/bibtex/parser.rb
Class Method Summary collapse
Class Method Details
.parse(filename) ⇒ Object
9 10 11 |
# File 'lib/bibtex/parser.rb', line 9 def self.parse(filename) parse_string File.read(filename) end |
.parse_string(data) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/bibtex/parser.rb', line 13 def self.parse_string(data) @lexer.feed data b = Bibliography.new while @lexer.more_tokens? b << parse_entry end return b end |