Module: BibTeX
- Defined in:
- lib/bibtex.rb,
lib/bibtex/entry.rb,
lib/bibtex/error.rb,
lib/bibtex/lexer.rb,
lib/bibtex/parser.rb,
lib/bibtex/version.rb,
lib/bibtex/elements.rb,
lib/bibtex/utilities.rb,
lib/bibtex/extensions.rb,
lib/bibtex/bibliography.rb
Overview
– BibTeX-Ruby Copyright © 2010 Sylvester Keil <sylvester.keil.or.at>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <www.gnu.org/licenses/>. ++
Defined Under Namespace
Modules: Extensions, Version Classes: Bibliography, Comment, Element, Entry, Error, Lexer, MetaComment, Parser, Preamble, String
Constant Summary collapse
- Log =
An instance of the Ruby core class
Logger
. Used for logging by BibTeX-Ruby. Logger.new(STDERR)
Class Method Summary collapse
- .log ⇒ Object
-
.open(file, options = {}) ⇒ Object
Opens a BibTeX file and returns a corresponding
Bibliography
object. -
.parse(string, options = {}) ⇒ Object
Parses the given string and returns a corresponding
Bibliography
object. -
.valid?(file) ⇒ Boolean
Returns true if the given file is a valid BibTeX bibliography.
Class Method Details
.open(file, options = {}) ⇒ Object
Opens a BibTeX file and returns a corresponding Bibliography
object.
23 24 25 |
# File 'lib/bibtex/utilities.rb', line 23 def open(file, ={}) Bibliography.open(file, ) end |
.parse(string, options = {}) ⇒ Object
Parses the given string and returns a corresponding Bibliography
object.
28 29 30 |
# File 'lib/bibtex/utilities.rb', line 28 def parse(string, ={}) BibTeX::Parser.new().parse(string) end |
.valid?(file) ⇒ Boolean
Returns true if the given file is a valid BibTeX bibliography.
33 34 35 |
# File 'lib/bibtex/utilities.rb', line 33 def valid?(file) Bibliography.open(file).valid? end |