Class: Pubid::Ieee::Identifiers::Nesc::Draft

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

Overview

Draft NESC identifier

Represents draft versions of the National Electrical Safety Code that are under development or review.

Examples:

nesc = Pubid::Ieee.parse("Draft National Electrical Safety Code, January 2016")
nesc.to_s  # => "Draft National Electrical Safety Code, January 2016"

Instance Method Summary collapse

Methods inherited from Base

#publisher_portion

Instance Method Details

#to_sString

Render draft identifier

Returns:

  • (String)

    Draft format with optional month and year



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

def to_s
  parts = ["Draft National Electrical Safety Code"]
  parts << ", #{month} #{year.year}" if month && year
  parts.join
end