Class: GetText::TextDomainGroup
- Inherits:
-
Object
- Object
- GetText::TextDomainGroup
- Defined in:
- lib/gettext/text_domain_group.rb
Instance Attribute Summary collapse
-
#text_domains ⇒ Object
readonly
Returns the value of attribute text_domains.
Instance Method Summary collapse
- #add(text_domain) ⇒ 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/text_domain_group.rb', line 18 def initialize @text_domains = [] end |
Instance Attribute Details
#text_domains ⇒ Object (readonly)
Returns the value of attribute text_domains.
16 17 18 |
# File 'lib/gettext/text_domain_group.rb', line 16 def text_domains @text_domains end |
Instance Method Details
#add(text_domain) ⇒ Object
22 23 24 |
# File 'lib/gettext/text_domain_group.rb', line 22 def add(text_domain) @text_domains.unshift(text_domain) unless @text_domains.include? text_domain end |