Sha256: 1dd1e807d8f35047435d07b8139893db2cec4541a67f037226281702d5ba2d20
Contents?: true
Size: 656 Bytes
Versions: 29
Compression:
Stored size: 656 Bytes
Contents
# Simple Locale tag implementation that computes subtags by simply splitting # the locale tag at '-' occurences. 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
29 entries across 27 versions & 9 rubygems