Class: GetText::TextDomainGroup
- Inherits:
-
Object
- Object
- GetText::TextDomainGroup
- Defined in:
- lib/gettext/runtime/textdomain_group.rb
Instance Attribute Summary collapse
-
#textdomains ⇒ Object
readonly
Returns the value of attribute textdomains.
Instance Method Summary collapse
- #add(textdomain) ⇒ Object
-
#initialize ⇒ TextDomainGroup
constructor
A new instance of TextDomainGroup.
Constructor Details
#initialize ⇒ TextDomainGroup
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
#textdomains ⇒ Object (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 |