Class: GetText::TextDomainGroup
- Inherits:
-
Object
- Object
- GetText::TextDomainGroup
- Defined in:
- lib/gettext/textdomain_group.rb
Instance Attribute Summary collapse
-
#supported_language_tags ⇒ Object
readonly
Returns the value of attribute supported_language_tags.
-
#textdomains ⇒ Object
readonly
Returns the value of attribute textdomains.
Instance Method Summary collapse
- #add(textdomain) ⇒ Object
-
#initialize(supported_language_tags) ⇒ TextDomainGroup
constructor
A new instance of TextDomainGroup.
Constructor Details
#initialize(supported_language_tags) ⇒ TextDomainGroup
Returns a new instance of TextDomainGroup.
16 17 18 19 |
# File 'lib/gettext/textdomain_group.rb', line 16 def initialize() @textdomains = [] @supported_language_tags = end |
Instance Attribute Details
#supported_language_tags ⇒ Object (readonly)
Returns the value of attribute supported_language_tags.
14 15 16 |
# File 'lib/gettext/textdomain_group.rb', line 14 def @supported_language_tags end |
#textdomains ⇒ Object (readonly)
Returns the value of attribute textdomains.
14 15 16 |
# File 'lib/gettext/textdomain_group.rb', line 14 def textdomains @textdomains end |
Instance Method Details
#add(textdomain) ⇒ Object
21 22 23 |
# File 'lib/gettext/textdomain_group.rb', line 21 def add(textdomain) @textdomains.unshift(textdomain) unless @textdomains.include? textdomain end |