class CiteProc::CitationItem

A {CitationItem} consititues the main input elements to CiteProc’s processing methods. In order to be processed correctly, an item must have a valid {#id} attribute used to retrieve the correpsonding {Item} containing the actual bibliographic data.

Attributes

labels[R]
data[RW]

Public Class Methods

new(attributes = nil) { |self| ... } click to toggle source
# File lib/citeproc/citation_data.rb, line 64
def initialize(attributes = nil)
  merge(attributes)
  yield self if block_given?
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/citeproc/citation_data.rb, line 73
def <=>(other)
  return unless other.respond_to?(:data)
  data <=> other.data
end
initialize_copy(other) click to toggle source
# File lib/citeproc/citation_data.rb, line 69
def initialize_copy(other)
  @attributes = other.attributes.deep_copy
end
inspect() click to toggle source

@return [String] a human-readable representation of the citation item

# File lib/citeproc/citation_data.rb, line 79
def inspect
  "#<CiteProc::CitationItem #{[id, locator].compact.map(&:inspect).join(', ')}>"
end