Class: IsoBibItem::FormattedString
- Inherits:
-
LocalizedString
- Object
- LocalizedString
- IsoBibItem::FormattedString
- Defined in:
- lib/iso_bib_item/formatted_string.rb
Overview
Formatted string
Instance Attribute Summary collapse
- #type ⇒ String readonly
Attributes inherited from LocalizedString
Instance Method Summary collapse
-
#initialize(content:, language: nil, script: nil, type: 'plain') ⇒ FormattedString
constructor
A new instance of FormattedString.
- #to_xml(builder) ⇒ Object
Methods inherited from LocalizedString
Constructor Details
#initialize(content:, language: nil, script: nil, type: 'plain') ⇒ FormattedString
Returns a new instance of FormattedString.
17 18 19 20 |
# File 'lib/iso_bib_item/formatted_string.rb', line 17 def initialize(content:, language: nil, script: nil, type: 'plain') super(content, language, script) @type = type end |
Instance Attribute Details
#type ⇒ String (readonly)
9 10 11 |
# File 'lib/iso_bib_item/formatted_string.rb', line 9 def type @type end |
Instance Method Details
#to_xml(builder) ⇒ Object
22 23 24 25 |
# File 'lib/iso_bib_item/formatted_string.rb', line 22 def to_xml(builder) builder.parent["format"] = type if type super end |