Sha256: ce748d3e5f35d7f817275d0e21da2740ac7c23b452bf1bfd291aee4ddc79a3b1
Contents?: true
Size: 503 Bytes
Versions: 154
Compression:
Stored size: 503 Bytes
Contents
# encoding: utf-8 module I18n module Locale module Tag module Parents def parent @parent ||= begin segs = to_a.compact segs.length > 1 ? self.class.tag(*segs[0..(segs.length-2)].join('-')) : nil end end def self_and_parents @self_and_parents ||= [self] + parents end def parents @parents ||= ([parent] + (parent ? parent.parents : [])).compact end end end end end
Version data entries
154 entries across 94 versions & 8 rubygems