Class: IsoBibItem::TypedUri
- Inherits:
-
Object
- Object
- IsoBibItem::TypedUri
- Defined in:
- lib/iso_bib_item/bibliographic_item.rb
Overview
Typed URI
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#type ⇒ Symbol
readonly
:src/:obp/:rss.
Instance Method Summary collapse
-
#initialize(type:, content:) ⇒ TypedUri
constructor
A new instance of TypedUri.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(type:, content:) ⇒ TypedUri
Returns a new instance of TypedUri.
87 88 89 90 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 87 def initialize(type:, content:) @type = type @content = URI content if content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
83 84 85 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 83 def content @content end |
#type ⇒ Symbol (readonly)
Returns :src/:obp/:rss.
81 82 83 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 81 def type @type end |
Instance Method Details
#to_xml(builder) ⇒ Object
92 93 94 |
# File 'lib/iso_bib_item/bibliographic_item.rb', line 92 def to_xml(builder) builder.uri(content.to_s, type: type) end |