class I18n::Locale::Tag::Simple - i18n-0.6.11 Documentation

# class I18n::Locale::Tag::Simple

### Public Class Methods

new(*tag) click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 17
    def initialize(*tag)
      @tag = tag.join('-').to_sym
    end

### Public Instance Methods

subtags() click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 21
    def subtags
      @subtags = tag.to_s.split('-').map { |subtag| subtag.to_s }
    end

tag(tag) click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 8
    def tag(tag)
      new(tag)
    end

to_a() click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 33
    def to_a
      subtags
    end

to_s() click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 29
    def to_s
      tag.to_s
    end

to_sym() click to toggle source

    # File lib/i18n/locale/tag/simple.rb, line 25
    def to_sym
      tag
    end