Class: Pubid::Nist::Components::Volume

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

Overview

Volume component for NIST publications Format: vNUMBER where NUMBER is the volume number

Examples:

Volume.new(value: "6").to_s => "v6"
Volume.new(value: "12").to_s => "v12"

Used in:

- CSM (Commercial Standards Monthly): Volume 6, Issue 1
- CIRC (Circular): Volume 539

Instance Method Summary collapse

Instance Method Details

#to_iObject

Alias for numeric comparison



26
27
28
# File 'lib/pubid/nist/components/volume.rb', line 26

def to_i
  value.to_i
end

#to_sObject



21
22
23
# File 'lib/pubid/nist/components/volume.rb', line 21

def to_s
  "v#{value}"
end