File: text_domain_group.rb

package info (click to toggle)
ruby-gettext 3.0.2-2~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 4,728 kB
  • sloc: ruby: 7,977; makefile: 8
file content (26 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-

=begin
  gettext/text_domain_group - GetText::TextDomainGroup class

  Copyright (C) 2009  Masao Mutoh

  You may redistribute it and/or modify it under the same
  license terms as Ruby or LGPL.

=end

module GetText

  class TextDomainGroup
    attr_reader :text_domains

    def initialize
      @text_domains = []
    end

    def add(text_domain)
      @text_domains.unshift(text_domain) unless @text_domains.include? text_domain
    end
  end
end