class BibTeX::Preamble
Represents a @preamble object.
In BibTeX
an @preamble object contains a single string literal, a single constant, or a concatenation of string literals and constants.
Public Class Methods
new(value = '')
click to toggle source
Creates a new instance.
# File lib/bibtex/elements.rb, line 340 def initialize(value = '') @value = Value.new(value) end
Public Instance Methods
content()
click to toggle source
Returns a string representation of the @preamble's content.
# File lib/bibtex/elements.rb, line 345 def content @value.to_s(quotes: '"') end
to_s(_options = {})
click to toggle source
Returns a string representation of the @preamble object
# File lib/bibtex/elements.rb, line 350 def to_s(_options = {}) "@preamble{ #{content} }\n" end