Class: AsciidocBib::CitationData
- Inherits:
-
Object
- Object
- AsciidocBib::CitationData
- Defined in:
- lib/asciidoc-bib/citationdata.rb
Overview
Holds information about a citation in text: the text forming the citation, its type, pretext, and enclosed cites.
For example, the citation: "[cite:See:Lane12,59;Lane11]"
- original: "[cite:See:Lane12,59;Lane11]"
- type: "cite"
- pretext: "See"
- cites: [Citationref="Lane12",pages="59", Citationref="Lane11",pages="" ]
Instance Attribute Summary collapse
-
#cites ⇒ Object
readonly
List of Citation instances, defining each cite.
-
#original ⇒ Object
readonly
Original text defining this set of citations.
-
#pretext ⇒ Object
readonly
Any pretext given for the citation (e.g. 'See').
-
#type ⇒ Object
readonly
The type of citation (e.g. 'cite', 'citenp').
Instance Method Summary collapse
-
#initialize(original, type, pretext, cites) ⇒ CitationData
constructor
A new instance of CitationData.
Constructor Details
#initialize(original, type, pretext, cites) ⇒ CitationData
Returns a new instance of CitationData.
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/asciidoc-bib/citationdata.rb', line 22 def initialize original, type, pretext, cites @original = original @type = type @pretext = if pretext.nil? '' else pretext end @cites = cites end |
Instance Attribute Details
#cites ⇒ Object (readonly)
List of Citation instances, defining each cite.
20 21 22 |
# File 'lib/asciidoc-bib/citationdata.rb', line 20 def cites @cites end |
#original ⇒ Object (readonly)
Original text defining this set of citations.
14 15 16 |
# File 'lib/asciidoc-bib/citationdata.rb', line 14 def original @original end |
#pretext ⇒ Object (readonly)
Any pretext given for the citation (e.g. 'See').
18 19 20 |
# File 'lib/asciidoc-bib/citationdata.rb', line 18 def pretext @pretext end |
#type ⇒ Object (readonly)
The type of citation (e.g. 'cite', 'citenp').
16 17 18 |
# File 'lib/asciidoc-bib/citationdata.rb', line 16 def type @type end |