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.
11
12
13
14
|
# File 'lib/relaton_bib/biblio_note.rb', line 11
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
4
5
6
|
# File 'lib/relaton_bib/biblio_note.rb', line 4
def type
@type
end
|
Instance Method Details
#to_xml(builder) ⇒ Object
17
18
19
20
21
|
# File 'lib/relaton_bib/biblio_note.rb', line 17
def to_xml(builder)
xml = builder.note { super }
xml[:type] = type if type
xml
end
|