Class: Pubid::Itu::Identifiers::Amendment
- Inherits:
-
Supplement
- Object
- Supplement
- Pubid::Itu::Identifiers::Amendment
- Defined in:
- lib/pubid/itu/identifiers/amendment.rb
Overview
Amendment identifier (Amd) Pattern: "ITU-T G.989 Amd 1", "ITU-T G.780/Y.1351 Amd 1 (2004)"
Instance Method Summary collapse
Instance Method Details
#==(other) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/pubid/itu/identifiers/amendment.rb', line 31 def ==(other) return false unless other.is_a?(Amendment) base == other.base && number == other.number && date == other.date end |
#to_s ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pubid/itu/identifiers/amendment.rb', line 9 def to_s result = base ? base.to_s : "#{publisher}-#{sector}" # Add series if no base if !base && series result += " #{series}" end result += " Amd #{number}" # Add date if present if date result += if date.month " (#{date.month}/#{date.year})" else " (#{date.year})" end end result end |