Class: Pubid::Etsi::Identifier::Supplement
- Defined in:
- lib/pubid/etsi/identifier/supplement.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#base ⇒ Object
Returns the value of attribute base.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(base:, number:) ⇒ Supplement
constructor
A new instance of Supplement.
- #to_h(**args) ⇒ Object
Methods inherited from Base
get_parser_class, get_renderer_class, transform, transform_supplements, type
Constructor Details
#initialize(base:, number:) ⇒ Supplement
Returns a new instance of Supplement.
6 7 8 9 |
# File 'lib/pubid/etsi/identifier/supplement.rb', line 6 def initialize(base:, number:) @base = base @number = number end |
Instance Attribute Details
#base ⇒ Object
Returns the value of attribute base.
4 5 6 |
# File 'lib/pubid/etsi/identifier/supplement.rb', line 4 def base @base end |
Instance Method Details
#to_h(**args) ⇒ Object
11 12 13 |
# File 'lib/pubid/etsi/identifier/supplement.rb', line 11 def to_h(**args) @base.to_h(**args).merge(self.type[:key] => super) end |