Class: GetText::TextDomainGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/gettext/runtime/textdomain_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTextDomainGroup

Returns a new instance of TextDomainGroup.



18
19
20
# File 'lib/gettext/runtime/textdomain_group.rb', line 18

def initialize
  @textdomains = []
end

Instance Attribute Details

#textdomainsObject (readonly)

Returns the value of attribute textdomains.



16
17
18
# File 'lib/gettext/runtime/textdomain_group.rb', line 16

def textdomains
  @textdomains
end

Instance Method Details

#add(textdomain) ⇒ Object



22
23
24
# File 'lib/gettext/runtime/textdomain_group.rb', line 22

def add(textdomain)
  @textdomains.unshift(textdomain) unless @textdomains.include? textdomain
end