Sha256: d46cd0ddf439287e909ab620e77ca09abe8e02b2f4f408d8f1a6c998b59aa33d

Contents?: true

Size: 752 Bytes

Versions: 27

Compression:

Stored size: 752 Bytes

Contents

module RelatonIec
  class CitationType
    # @return [String]
    attr_reader :bibitemid

    # @return [Array<elatonBib::Locality, RelatonBib::LocalityStack>]
    attr_reader :locality

    # @return [String, nil]
    attr_reader :date

    #
    # @param [String] bibitemid
    # @param [Array<RelatonBib::Locality, RelatonBib::LocalityStack>] locality
    # @param [String, nil] date
    #
    def initialize(bibitemid:, locality:, date: nil)
      @bibitemid = bibitemid
      @locality = locality
      @date = date
    end

    #
    # @param [Nokogiri::XML::Builder] builder
    #
    def to_xml(builder)
      builder.parent[:bibitemid] = bibitemid
      locality.each { |l| l.to_xml builder }
      builder.date date if date
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
relaton-iec-1.20.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.19.1 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.19.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.18.1 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.18.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.17.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.16.4 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.16.3 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.16.2 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.16.1 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.16.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.14.4 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.14.3 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.14.2 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.14.1 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.14.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.13.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.12.0 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.11.4 lib/relaton_iec/basic_block/citation_type.rb
relaton-iec-1.11.3 lib/relaton_iec/basic_block/citation_type.rb