Class: BibTeX::MetaContent

Inherits:
Element
  • Object
show all
Defined in:
lib/bibtex/elements.rb

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

Attributes inherited from Element

#bibliography, #id

Instance Method Summary collapse

Methods inherited from Element

#<=>, #added_to_bibliography, #digest, #has_type?, #inspect, #join, #matches?, #meets?, #meets_all?, #meets_any?, #names, parse, #removed_from_bibliography, #replace, #to_hash, #to_json, #to_xml, #to_yaml, #type, #values_at

Constructor Details

#initialize(content = '') ⇒ MetaContent

Returns a new instance of MetaContent.



369
370
371
# File 'lib/bibtex/elements.rb', line 369

def initialize(content = '')
  @content = content
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



367
368
369
# File 'lib/bibtex/elements.rb', line 367

def content
  @content
end

Instance Method Details

#to_s(options = {}) ⇒ Object



373
# File 'lib/bibtex/elements.rb', line 373

def to_s(options = {}); @content; end