Class: Isq::PartDocument
- Inherits:
-
SduSmart::PublicationDocument
- Object
- SduSmart::PublicationDocument
- Isq::PartDocument
- Defined in:
- lib/isq/part_document.rb
Constant Summary collapse
- PART_TITLES =
{ "2" => "Mathematics", "3" => "Space and Time", "4" => "Mechanics", "5" => "Thermodynamics", "6" => "Electromagnetism", "7" => "Light and Radiation", "8" => "Acoustics", "9" => "Physical Chemistry and Molecular Physics", "10" => "Atomic and Nuclear Physics", "11" => "Characteristic Numbers", "12" => "Condensed Matter Physics", "13" => "Information Science", }.freeze
Class Method Summary collapse
Class Method Details
.all_parts ⇒ Object
59 60 61 |
# File 'lib/isq/part_document.rb', line 59 def self.all_parts PART_TITLES.keys.map { |p| for_part(p) } end |
.for_part(part_number) ⇒ Object
49 50 51 52 53 54 55 56 57 |
# File 'lib/isq/part_document.rb', line 49 def self.for_part(part_number) new( id: "part-#{part_number}", part_number: "ISO 80000-#{part_number}", title: PART_TITLES.fetch(part_number, "Part #{part_number}"), publication_type: "smart:internationalStandard", bindingness_type: "smart:normative", ) end |