Class: BibTeX::Comment
Overview
Represents a @comment object.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
Attributes inherited from Element
Instance Method Summary collapse
-
#initialize(content = '') ⇒ Comment
constructor
A new instance of Comment.
- #to_s(_options = {}) ⇒ Object
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 = '') ⇒ Comment
Returns a new instance of Comment.
359 360 361 |
# File 'lib/bibtex/elements.rb', line 359 def initialize(content = '') @content = content end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
357 358 359 |
# File 'lib/bibtex/elements.rb', line 357 def content @content end |
Instance Method Details
#to_s(_options = {}) ⇒ Object
363 364 365 |
# File 'lib/bibtex/elements.rb', line 363 def to_s( = {}) "@comment{ #{@content} }\n" end |