Class: Pubid::Ieee::Identifiers::Nesc::Base
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Ieee::Identifiers::Nesc::Base
- Defined in:
- lib/pubid/ieee/identifiers/nesc/base.rb
Overview
Base class for National Electrical Safety Code (NESC) identifiers
NESC is published by IEEE Standards Association and covers electrical safety standards for utilities and communication systems.
Instance Method Summary collapse
-
#publisher_portion ⇒ String
Publisher portion for NESC identifiers.
-
#to_s ⇒ String
Base rendering - override in subclasses.
Instance Method Details
#publisher_portion ⇒ String
Publisher portion for NESC identifiers
35 36 37 |
# File 'lib/pubid/ieee/identifiers/nesc/base.rb', line 35 def publisher_portion "NESC" end |
#to_s ⇒ String
Base rendering - override in subclasses
42 43 44 45 46 47 48 49 50 51 |
# File 'lib/pubid/ieee/identifiers/nesc/base.rb', line 42 def to_s parts = [] if code && year parts << "#{code}-#{year.year}" elsif year parts << year.year.to_s end parts << "National Electrical Safety Code" parts.join(" ") end |