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, parse_date, parse_yaml

Constructor Details

This class inherits a constructor from RelatonBib::LocalityStack

Instance Method Details

#to_hashObject



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

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

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


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

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