Class: Pubid::Iec::Components::Publisher

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/pubid/iec/components/publisher.rb

Constant Summary collapse

PUBLISHERS =
{
  "IEC" => "International Electrotechnical Commission",
  "ISO/IEC" => "ISO/IEC Joint Technical Committee",
  "CISPR" => "International Special Committee on Radio Interference",
  "IECEE" => "IEC System of Conformity Assessment Schemes for Electrotechnical Equipment and Components",
  "IECEx" => "IEC System for Certification to Standards Relating to Equipment for Use in Explosive Atmospheres",
  "IECQ" => "IEC Quality Assessment System for Electronic Components",
}.freeze

Instance Method Summary collapse

Instance Method Details

#full_nameObject



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

def full_name
  PUBLISHERS[body]
end

#to_sObject



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

def to_s
  body
end

#validate!Object



19
20
21
22
23
# File 'lib/pubid/iec/components/publisher.rb', line 19

def validate!
  unless PUBLISHERS.key?(body)
    raise ArgumentError, "Unknown IEC publisher: #{body}"
  end
end