Class: Pubid::Iec::TrfIdentifier

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/iec/trf_identifier.rb

Constant Summary

Constants inherited from Base

Base::PROJECT_STAGES

Instance Attribute Summary collapse

Attributes inherited from Base

#database, #day, #fragment, #month, #sheet, #vap

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

get_amendment_class, get_corrigendum_class, get_identifier, get_transformer_class, get_update_codes, has_project_stage?, has_type?, #lookup_typed_stage, #renderer_data, resolve_project_stage, #to_s, transform, transform_hash

Constructor Details

#initialize(publisher: "IEC", decision_sheet: nil, trf_publisher: nil, trf_series: nil, trf_version: nil, test_type: nil, **args) ⇒ TrfIdentifier

Returns a new instance of TrfIdentifier.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/pubid/iec/trf_identifier.rb', line 8

def initialize(publisher: "IEC", decision_sheet: nil, trf_publisher: nil,
               trf_series: nil, trf_version: nil, test_type: nil,
               **args)
  @decision_sheet = decision_sheet if decision_sheet
  @trf_publisher = trf_publisher.to_s if trf_publisher
  @trf_series = trf_series if trf_series
  @trf_version = trf_version.to_s if trf_version
  @test_type = test_type if test_type

  super(**args.merge(publisher: publisher))
end

Instance Attribute Details

#conjuction_partObject

Returns the value of attribute conjuction_part.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def conjuction_part
  @conjuction_part
end

#decision_sheetObject

Returns the value of attribute decision_sheet.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def decision_sheet
  @decision_sheet
end

#part_versionObject

Returns the value of attribute part_version.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def part_version
  @part_version
end

#test_typeObject

Returns the value of attribute test_type.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def test_type
  @test_type
end

#trf_publisherObject

Returns the value of attribute trf_publisher.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def trf_publisher
  @trf_publisher
end

#trf_seriesObject

Returns the value of attribute trf_series.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def trf_series
  @trf_series
end

#trf_versionObject

Returns the value of attribute trf_version.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def trf_version
  @trf_version
end

#versionObject

Returns the value of attribute version.



4
5
6
# File 'lib/pubid/iec/trf_identifier.rb', line 4

def version
  @version
end

Class Method Details

.get_parser_classObject



25
26
27
# File 'lib/pubid/iec/trf_identifier.rb', line 25

def get_parser_class
  TrfParser
end

.get_renderer_classObject



29
30
31
# File 'lib/pubid/iec/trf_identifier.rb', line 29

def get_renderer_class
  Renderer::TrfPubid
end

Instance Method Details

#urnObject



20
21
22
# File 'lib/pubid/iec/trf_identifier.rb', line 20

def urn
  Renderer::TrfUrn.new(renderer_data).render
end