Class: BibTeX::Comment

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

Overview

Represents a @comment object.

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 = '') ⇒ Comment

Returns a new instance of Comment.



332
333
334
# File 'lib/bibtex/elements.rb', line 332

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

Instance Attribute Details

#contentObject

Returns the value of attribute content.



330
331
332
# File 'lib/bibtex/elements.rb', line 330

def content
  @content
end

Instance Method Details

#to_s(options = {}) ⇒ Object



336
337
338
# File 'lib/bibtex/elements.rb', line 336

def to_s(options = {})
  "@comment{ #@content }"
end