Class: Pubid::Nist::Components::Translation
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Nist::Components::Translation
- Defined in:
- lib/pubid/nist/components/translation.rb
Overview
Instance Method Summary collapse
-
#language ⇒ String?
Backward compatibility: language method returns code.
-
#to_s(format = :short) ⇒ String
Render translation in specified format.
Instance Method Details
#language ⇒ String?
Backward compatibility: language method returns code
20 21 22 |
# File 'lib/pubid/nist/components/translation.rb', line 20 def language code end |
#to_s(format = :short) ⇒ String
Render translation in specified format
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/pubid/nist/components/translation.rb', line 27 def to_s(format = :short) return "" if code.nil? case format when :short, :long " #{code}" when :mr ".#{code}" else " #{code}" end end |