Code Review
/
packages
/
precise
/
mcollective.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Update mcollective.init according to OSCI-855
[packages/precise/mcollective.git]
/
lib
/
mcollective
/
vendor
/
i18n
/
lib
/
i18n
/
locale
/
tag
/
parents.rb
1
module I18n
2
module Locale
3
module Tag
4
module Parents
5
def parent
6
@parent ||= begin
7
segs = to_a.compact
8
segs.length > 1 ? self.class.tag(*segs[0..(segs.length-2)].join('-')) : nil
9
end
10
end
11
12
def self_and_parents
13
@self_and_parents ||= [self] + parents
14
end
15
16
def parents
17
@parents ||= ([parent] + (parent ? parent.parents : [])).compact
18
end
19
end
20
end
21
end
22
end