Class: Pubid::Nist::Stage
- Inherits:
-
Object
- Object
- Pubid::Nist::Stage
- Defined in:
- lib/pubid/nist/stage.rb
Instance Attribute Summary collapse
-
#stage ⇒ Object
Returns the value of attribute stage.
Instance Method Summary collapse
-
#initialize(stage) ⇒ Stage
constructor
A new instance of Stage.
- #nil? ⇒ Boolean
- #to_s(format = :short) ⇒ Object
Constructor Details
#initialize(stage) ⇒ Stage
Returns a new instance of Stage.
7 8 9 |
# File 'lib/pubid/nist/stage.rb', line 7 def initialize(stage) @stage = stage end |
Instance Attribute Details
#stage ⇒ Object
Returns the value of attribute stage.
5 6 7 |
# File 'lib/pubid/nist/stage.rb', line 5 def stage @stage end |
Instance Method Details
#nil? ⇒ Boolean
24 25 26 |
# File 'lib/pubid/nist/stage.rb', line 24 def nil? @stage.nil? end |
#to_s(format = :short) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pubid/nist/stage.rb', line 11 def to_s(format = :short) return "" if nil? case format when :short "(#{@stage})" when :mr @stage else STAGES[@stage] end end |