Class: Pubid::Iec::Identifier::TestReportForm

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/iec/identifier/test_report_form.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) ⇒ TestReportForm

Returns a new instance of TestReportForm.



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

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.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def conjuction_part
  @conjuction_part
end

#decision_sheetObject

Returns the value of attribute decision_sheet.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def decision_sheet
  @decision_sheet
end

#part_versionObject

Returns the value of attribute part_version.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def part_version
  @part_version
end

#test_typeObject

Returns the value of attribute test_type.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def test_type
  @test_type
end

#trf_publisherObject

Returns the value of attribute trf_publisher.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def trf_publisher
  @trf_publisher
end

#trf_seriesObject

Returns the value of attribute trf_series.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def trf_series
  @trf_series
end

#trf_versionObject

Returns the value of attribute trf_version.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def trf_version
  @trf_version
end

#versionObject

Returns the value of attribute version.



5
6
7
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 5

def version
  @version
end

Class Method Details

.get_parser_classObject



30
31
32
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 30

def get_parser_class
  TrfParser
end

.get_renderer_classObject



34
35
36
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 34

def get_renderer_class
  Renderer::TrfPubid
end

.typeObject



21
22
23
# File 'lib/pubid/iec/identifier/test_report_form.rb', line 21

def self.type
  { key: :trf, title: "Test Report Form", short: "TRF" }
end

Instance Method Details

#urnObject



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

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