Class: RelatonBib::BiblioNote
Constant Summary
FormattedString::FORMATS
Instance Attribute Summary collapse
#format
#content, #language, #script
Instance Method Summary
collapse
#empty?, #to_s
Constructor Details
#initialize(content:, type: nil, language: nil, script: nil, format: nil) ⇒ BiblioNote
Returns a new instance of BiblioNote.
24
25
26
27
|
# File 'lib/relaton_bib/biblio_note.rb', line 24
def initialize(content:, type: nil, language: nil, script: nil, format: nil)
@type = type
super content: content, language: language, script: script, format: format
end
|
Instance Attribute Details
#type ⇒ String
17
18
19
|
# File 'lib/relaton_bib/biblio_note.rb', line 17
def type
@type
end
|
Instance Method Details
#to_xml(builder) ⇒ Object
30
31
32
33
34
|
# File 'lib/relaton_bib/biblio_note.rb', line 30
def to_xml(builder)
xml = builder.note { super }
xml[:type] = type if type
xml
end
|