Module: Boson::Index

Extended by:
Index
Included in:
Index
Defined in:
lib/boson/index.rb

Overview

This class manages indexing/storing all commands and libraries. See RepoIndex for details about the index created for each Repo.

Instance Method Summary collapse

Instance Method Details

#all_main_methodsObject



43
44
45
# File 'lib/boson/index.rb', line 43

def all_main_methods
  indexes.map {|e| e.all_main_methods}.flatten
end

#commandsObject



35
36
37
# File 'lib/boson/index.rb', line 35

def commands
  indexes.map {|e| e.commands}.flatten
end

#find_command(command) ⇒ Object



28
29
30
31
32
33
# File 'lib/boson/index.rb', line 28

def find_command(command)
  indexes.each {|e|
    (cmd = Command.find(command, e.commands)) and return(cmd)
  }
  nil
end

#find_library(command, object = false) ⇒ Object



21
22
23
24
25
26
# File 'lib/boson/index.rb', line 21

def find_library(command, object=false)
  indexes.each {|e|
    (lib = e.find_library(command, object)) and return lib
  }
  nil
end

#indexesObject

Array of indexes, one per repo in Boson.repos.



7
8
9
# File 'lib/boson/index.rb', line 7

def indexes
  @indexes ||= Boson.repos.map {|e| RepoIndex.new(e) }
end

#librariesObject



39
40
41
# File 'lib/boson/index.rb', line 39

def libraries
  indexes.map {|e| e.libraries}.flatten
end

#readObject

:stopdoc:



17
18
19
# File 'lib/boson/index.rb', line 17

def read
  indexes.each {|e| e.read }
end

#update(options = {}) ⇒ Object

Updates all repo indexes.



12
13
14
# File 'lib/boson/index.rb', line 12

def update(options={})
  indexes.each {|e| e.update(options) }
end