Class: RelatonBib::SourceLocalityStack

Inherits:
LocalityStack show all
Defined in:
lib/relaton_bib/bib_item_locality.rb

Constant Summary

Constants included from RelatonBib

VERSION

Instance Attribute Summary

Attributes inherited from LocalityStack

#locality

Instance Method Summary collapse

Methods inherited from LocalityStack

#initialize, #to_asciibib, #to_bibtex

Methods included from RelatonBib

array, format_date, grammar_hash, parse_date, parse_yaml

Methods included from Config

#configuration, #configure

Constructor Details

This class inherits a constructor from RelatonBib::LocalityStack

Instance Method Details

#to_hashObject



166
167
168
# File 'lib/relaton_bib/bib_item_locality.rb', line 166

def to_hash
  { "source_locality_stack" => single_element_array(locality) }
end

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


159
160
161
162
163
# File 'lib/relaton_bib/bib_item_locality.rb', line 159

def to_xml(builder)
  builder.sourceLocalityStack do |b|
    locality.each { |l| l.to_xml(b) }
  end
end