Class: Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_doc/data/data_processor.rb

Class Method Summary collapse

Class Method Details

.lastObject



15
16
17
# File 'lib/ruby_doc/data/data_processor.rb', line 15

def self.last 
  UI.browse_list($DocDB[1500..$DocDB.count], "Last")
end

.load_doc(doc) ⇒ Object

Load Doc==============================


19
20
21
22
23
24
25
26
27
28
29
# File 'lib/ruby_doc/data/data_processor.rb', line 19

def self.load_doc(doc) 
  if !doc.nil?
    Scraper.load_class_doc(doc) if doc.type == "Class" || doc.type == "Module"
    Scraper.load_method_doc(doc) if doc.type == "Method"
    
    UI.display_class(doc) if doc.type == "Class" || doc.type == "Module"
    UI.display_method(doc) if doc.type == "Method"
  else 
    UI.nil_error
  end
end

.page1Object

Browse Pages============================


3
4
5
# File 'lib/ruby_doc/data/data_processor.rb', line 3

def self.page1 
  UI.browse_list($DocDB[0..499], "Page1")
end

.page2Object



7
8
9
# File 'lib/ruby_doc/data/data_processor.rb', line 7

def self.page2 
  UI.browse_list($DocDB[500..999], "Page2")
end

.page3Object



11
12
13
# File 'lib/ruby_doc/data/data_processor.rb', line 11

def self.page3 
  UI.browse_list($DocDB[1000..1499], "Page3")
end

.search(name) ⇒ Object

SEARCH===============================


31
32
33
# File 'lib/ruby_doc/data/data_processor.rb', line 31

def self.search(name)
  matches = $DocDB.find_all{|doc| doc.name.downcase.include?(name)}
end