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.



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

def initialize
  @textdomains = []
end

Instance Attribute Details

#textdomainsObject (readonly)

Returns the value of attribute textdomains.



14
15
16
# File 'lib/gettext/runtime/textdomain_group.rb', line 14

def textdomains
  @textdomains
end

Instance Method Details

#add(textdomain) ⇒ Object



20
21
22
# File 'lib/gettext/runtime/textdomain_group.rb', line 20

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