Class: RelatonIec::CitationType
- Inherits:
-
Object
- Object
- RelatonIec::CitationType
- Defined in:
- lib/relaton_iec/basic_block/citation_type.rb
Direct Known Subclasses
Instance Attribute Summary collapse
- #bibitemid ⇒ String readonly
- #date ⇒ String? readonly
- #locality ⇒ Array<elatonBib::Locality, RelatonBib::LocalityStack> readonly
Instance Method Summary collapse
-
#initialize(bibitemid:, locality:, date: nil) ⇒ CitationType
constructor
A new instance of CitationType.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(bibitemid:, locality:, date: nil) ⇒ CitationType
Returns a new instance of CitationType.
17 18 19 20 21 |
# File 'lib/relaton_iec/basic_block/citation_type.rb', line 17 def initialize(bibitemid:, locality:, date: nil) @bibitemid = bibitemid @locality = locality @date = date end |
Instance Attribute Details
#bibitemid ⇒ String (readonly)
4 5 6 |
# File 'lib/relaton_iec/basic_block/citation_type.rb', line 4 def bibitemid @bibitemid end |
#date ⇒ String? (readonly)
10 11 12 |
# File 'lib/relaton_iec/basic_block/citation_type.rb', line 10 def date @date end |
#locality ⇒ Array<elatonBib::Locality, RelatonBib::LocalityStack> (readonly)
7 8 9 |
# File 'lib/relaton_iec/basic_block/citation_type.rb', line 7 def locality @locality end |
Instance Method Details
#to_xml(builder) ⇒ Object
26 27 28 29 30 |
# File 'lib/relaton_iec/basic_block/citation_type.rb', line 26 def to_xml(builder) builder.parent[:bibitemid] = bibitemid locality.each { |l| l.to_xml builder } builder.date date if date end |