Class: BibTeX::MetaContent
Overview
Represents text in a ‘.bib’ file, but outside of an actual BibTeX object; typically, such text is treated as a comment and is ignored by the parser. BibTeX-Ruby offers this class to allows for post-processing of this type of ‘meta’ content. If you want the parser to include MetaComment
objects, you need to add :meta_content
to the parser’s :include
option.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(content = '') ⇒ MetaContent
constructor
A new instance of MetaContent.
- #to_s(options = {}) ⇒ Object
Methods inherited from Element
#<=>, #added_to_bibliography, #has_type?, #join, #matches?, #meets?, parse, #removed_from_bibliography, #replace, #to_hash, #to_json, #to_xml, #to_yaml, #type
Constructor Details
#initialize(content = '') ⇒ MetaContent
Returns a new instance of MetaContent.
275 276 277 |
# File 'lib/bibtex/elements.rb', line 275 def initialize(content = '') @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
273 274 275 |
# File 'lib/bibtex/elements.rb', line 273 def content @content end |
Instance Method Details
#to_s(options = {}) ⇒ Object
279 |
# File 'lib/bibtex/elements.rb', line 279 def to_s( = {}); @content; end |