Class: Pubid::Bsi::Identifier::Collection

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/bsi/identifier/collection.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#adopted, #month, #pdf, #supplement, #tracked_changes, #translation

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

get_parser_class, get_renderer_class, get_transformer_class, transform, transform_collection, transform_expert_commentary, transform_hash, transform_national_annex

Constructor Details

#initialize(identifiers:, **args) ⇒ Collection

Returns a new instance of Collection.



8
9
10
11
# File 'lib/pubid/bsi/identifier/collection.rb', line 8

def initialize(identifiers:, **args)
  @identifiers = identifiers
  super(publisher: nil, number: nil, **args)
end

Instance Attribute Details

#identifiersObject

Returns the value of attribute identifiers.



6
7
8
# File 'lib/pubid/bsi/identifier/collection.rb', line 6

def identifiers
  @identifiers
end

Class Method Details

.typeObject



13
14
15
# File 'lib/pubid/bsi/identifier/collection.rb', line 13

def self.type
  { key: :collection, title: "Collection" }
end

Instance Method Details

#to_sObject



17
18
19
# File 'lib/pubid/bsi/identifier/collection.rb', line 17

def to_s
  Renderer::Collection.new(to_h(deep: false)).render
end