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

Methods included from RelatonBib

parse_date

Constructor Details

This class inherits a constructor from RelatonBib::LocalityStack

Instance Method Details

#to_hashObject



91
92
93
# File 'lib/relaton_bib/bib_item_locality.rb', line 91

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

#to_xml(builder) ⇒ Object

Parameters:

  • builder (Nokogiri::XML::Builder)


84
85
86
87
88
# File 'lib/relaton_bib/bib_item_locality.rb', line 84

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