Class: Pubid::Ieee::Identifiers::Nesc::Standard

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/ieee/identifiers/nesc/standard.rb

Overview

Standard NESC identifier with C2-YYYY format

Represents the standard National Electrical Safety Code publications using the C2 designation followed by publication year.

Examples:

nesc = Pubid::Ieee.parse("C2-1997 National Electric Safety Code")
nesc.to_s  # => "C2-1997 National Electrical Safety Code"

Instance Method Summary collapse

Methods inherited from Base

#publisher_portion

Instance Method Details

#to_sString

Render standard NESC identifier

Returns:

  • (String)

    C2-YYYY format



19
20
21
# File 'lib/pubid/ieee/identifiers/nesc/standard.rb', line 19

def to_s
  "C2-#{year.year} National Electrical Safety Code"
end