Class: Pebbles::Uid::Roots
- Inherits:
-
Object
- Object
- Pebbles::Uid::Roots
- Defined in:
- lib/pebbles-uid/roots.rb
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(uids) ⇒ Roots
constructor
A new instance of Roots.
- #unique ⇒ Object
Constructor Details
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
5 6 7 |
# File 'lib/pebbles-uid/roots.rb', line 5 def paths @paths end |
Instance Method Details
#unique ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pebbles-uid/roots.rb', line 13 def unique unless @unique @unique = [] paths.each do |uid, path| unless paths.any? { |_, other| path.child_of?(other) } @unique << uid end end end @unique end |