Class: IsoBibItem::IsoSubgroup
- Inherits:
-
Object
- Object
- IsoBibItem::IsoSubgroup
- Defined in:
- lib/iso_bib_item/iso_project_group.rb
Overview
ISO subgroup.
Instance Attribute Summary collapse
- #name ⇒ String readonly
- #number ⇒ Integer readonly
- #type ⇒ String readonly
Instance Method Summary collapse
-
#initialize(name:, type: nil, number: nil) ⇒ IsoSubgroup
constructor
A new instance of IsoSubgroup.
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(name:, type: nil, number: nil) ⇒ IsoSubgroup
Returns a new instance of IsoSubgroup.
65 66 67 68 69 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 65 def initialize(name:, type: nil, number: nil) @name = name @type = type @number = number end |
Instance Attribute Details
#name ⇒ String (readonly)
60 61 62 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 60 def name @name end |
#number ⇒ Integer (readonly)
57 58 59 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 57 def number @number end |
#type ⇒ String (readonly)
54 55 56 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 54 def type @type end |
Instance Method Details
#to_xml(builder) ⇒ Object
72 73 74 75 76 |
# File 'lib/iso_bib_item/iso_project_group.rb', line 72 def to_xml(builder) builder.parent[:number] = number if number builder.parent[:type] = type if type builder.text name end |