Sha256: b78d8db6f358045154f12372b0d13e51d06553306fea4f427780c5ae24f79556
Contents?: true
Size: 657 Bytes
Versions: 30
Compression:
Stored size: 657 Bytes
Contents
# Simple Locale tag implementation that computes subtags by simply splitting # the locale tag at '-' occurrences. module I18n module Locale module Tag class Simple class << self def tag(tag) new(tag) end end include Parents attr_reader :tag def initialize(*tag) @tag = tag.join('-').to_sym end def subtags @subtags = tag.to_s.split('-').map!(&:to_s) end def to_sym tag end def to_s tag.to_s end def to_a subtags end end end end end
Version data entries
30 entries across 28 versions & 11 rubygems