Class: Pubid::Etsi::Components::Version
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Etsi::Components::Version
- Defined in:
- lib/pubid/etsi/components/version.rb
Overview
Represents an ETSI version string Format: V1.2.3, V2.0.0, or ed.1
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#to_s ⇒ Object
true for ed.N format.
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 |
# File 'lib/pubid/etsi/components/version.rb', line 24 def ==(other) return false unless other.is_a?(Version) version == other.version && is_edition == other.is_edition end |
#to_s ⇒ Object
true for ed.N format
16 17 18 19 20 21 22 |
# File 'lib/pubid/etsi/components/version.rb', line 16 def to_s if is_edition "ed.#{version}" else "V#{version}" end end |