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.
18 19 20 |
# File 'lib/gettext/runtime/textdomain_group.rb', line 18 def initialize @textdomains = [] end |
Instance Attribute Details
#textdomains ⇒ Object (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 |