Class: I18nPoTools::PluralMessage
- Inherits:
-
Object
- Object
- I18nPoTools::PluralMessage
- Defined in:
- lib/i18n_po_tools/plural_message.rb
Instance Attribute Summary collapse
-
#translations ⇒ Object
Returns the value of attribute translations.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ PluralMessage
constructor
A new instance of PluralMessage.
- #to_a ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ PluralMessage
Returns a new instance of PluralMessage.
7 8 9 |
# File 'lib/i18n_po_tools/plural_message.rb', line 7 def initialize( = {}) @translations = .fetch(:translations,[]) end |
Instance Attribute Details
#translations ⇒ Object
Returns the value of attribute translations.
5 6 7 |
# File 'lib/i18n_po_tools/plural_message.rb', line 5 def translations @translations end |
Instance Method Details
#to_a ⇒ Object
11 12 13 |
# File 'lib/i18n_po_tools/plural_message.rb', line 11 def to_a translations end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/i18n_po_tools/plural_message.rb', line 15 def to_s translations.first.to_s end |