Module: Boson::Index
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
- #all_main_methods ⇒ Object
- #commands ⇒ Object
- #find_command(command) ⇒ Object
- #find_library(command, object = false) ⇒ Object
-
#indexes ⇒ Object
Array of indexes, one per repo in Boson.repos.
- #libraries ⇒ Object
-
#read ⇒ Object
:stopdoc:.
-
#update(options = {}) ⇒ Object
Updates all repo indexes.
Instance Method Details
#all_main_methods ⇒ Object
43 44 45 |
# File 'lib/boson/index.rb', line 43 def all_main_methods indexes.map {|e| e.all_main_methods}.flatten end |
#commands ⇒ Object
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 |
#indexes ⇒ Object
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 |
#libraries ⇒ Object
39 40 41 |
# File 'lib/boson/index.rb', line 39 def libraries indexes.map {|e| e.libraries}.flatten end |
#read ⇒ Object
: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(={}) indexes.each {|e| e.update() } end |