Class: Pubid::Etsi::Identifier::Supplement

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/etsi/identifier/supplement.rb

Direct Known Subclasses

Amendment, Corrigendum

Instance Attribute Summary collapse

Attributes inherited from Base

#published, #version

Instance Method Summary collapse

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

#baseObject

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