Class: Pubid::Components::Iteration
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Components::Iteration
- Defined in:
- lib/pubid/components/iteration.rb
Overview
Stage iteration component — the numeric suffix on a stage (e.g., “WD.2”).
Renders as the bare number; the caller decides the separator (“.”) because URN, MR, and human formats position iteration differently relative to the stage abbreviation.
Instance Method Summary collapse
Instance Method Details
#eql?(other) ⇒ Boolean
25 26 27 28 29 |
# File 'lib/pubid/components/iteration.rb', line 25 def eql?(other) return false unless other.is_a?(self.class) number == other.number end |
#hash ⇒ Object
21 22 23 |
# File 'lib/pubid/components/iteration.rb', line 21 def hash @hash ||= number.hash end |
#render(context: nil) ⇒ Object
17 18 19 |
# File 'lib/pubid/components/iteration.rb', line 17 def render(context: nil) number.to_s end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/pubid/components/iteration.rb', line 13 def to_s number.to_s end |