Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (21 sloc) 0.514 kb
# 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
Jump to Line
Something went wrong with that request. Please try again.