Class: I18nPoTools::PluralMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/i18n_po_tools/plural_message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @translations = options.fetch(:translations,[])
end

Instance Attribute Details

#translationsObject

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_aObject



11
12
13
# File 'lib/i18n_po_tools/plural_message.rb', line 11

def to_a
  translations
end

#to_sObject



15
16
17
# File 'lib/i18n_po_tools/plural_message.rb', line 15

def to_s
  translations.first.to_s
end