Class: Flexdot::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/flexdot/index.rb

Instance Method Summary collapse

Constructor Details

#initialize(index) ⇒ Index

Returns a new instance of Index.



5
6
7
# File 'lib/flexdot/index.rb', line 5

def initialize(index)
  @index = index
end

Instance Method Details

#each(&block) ⇒ Object



9
10
11
12
13
# File 'lib/flexdot/index.rb', line 9

def each(&block)
  index.each do |root, descendants|
    fetch_descendants(descendants, paths: [root], &block)
  end
end