Class: BitClust::ScreenManager

Inherits:
Object
  • Object
show all
Defined in:
lib/bitclust/screen.rb

Instance Method Summary collapse

Constructor Details

#initialize(h) ⇒ ScreenManager

Returns a new instance of ScreenManager.



25
26
27
28
29
30
31
# File 'lib/bitclust/screen.rb', line 25

def initialize(h)
  h[:urlmapper] ||= URLMapper.new(h)
  tmpldir = h[:templatedir] || "#{h[:datadir]}/template"
  h[:template_repository] ||= TemplateRepository.new(tmpldir)
  h[:message_catalog] ||= default_message_catalog(h)
  @conf = h
end

Instance Method Details

#class_index_screen(cs, opt) ⇒ Object



53
54
55
# File 'lib/bitclust/screen.rb', line 53

def class_index_screen(cs, opt)
  new_screen(ClassIndexScreen, cs, opt)
end

#class_screen(c, opt) ⇒ Object



57
58
59
# File 'lib/bitclust/screen.rb', line 57

def class_screen(c, opt)
  new_screen(ClassScreen, c, opt)
end

#doc_screen(d, opt) ⇒ Object



73
74
75
# File 'lib/bitclust/screen.rb', line 73

def doc_screen(d, opt)
  new_screen(DocScreen, d, opt)
end

#entry_screen(entry, opt) ⇒ Object



40
41
42
43
# File 'lib/bitclust/screen.rb', line 40

def entry_screen(entry, opt)
  @conf[:target_version] = opt[:target_version]
  new_screen(Screen.for_entry(entry), entry, opt)
end

#function_index_screen(fs, opt) ⇒ Object



81
82
83
# File 'lib/bitclust/screen.rb', line 81

def function_index_screen(fs, opt)
  new_screen(FunctionIndexScreen, fs, opt)
end

#function_screen(f, opt) ⇒ Object



77
78
79
# File 'lib/bitclust/screen.rb', line 77

def function_screen(f, opt)
  new_screen(FunctionScreen, f, opt)
end

#library_index_screen(libs, opt) ⇒ Object



45
46
47
# File 'lib/bitclust/screen.rb', line 45

def library_index_screen(libs, opt)
  new_screen(LibraryIndexScreen, libs, opt)
end

#library_screen(lib, opt) ⇒ Object



49
50
51
# File 'lib/bitclust/screen.rb', line 49

def library_screen(lib, opt)
  new_screen(LibraryScreen, lib, opt)
end

#method_screen(ms, opt) ⇒ Object



61
62
63
# File 'lib/bitclust/screen.rb', line 61

def method_screen(ms, opt)
  new_screen(MethodScreen, ms, opt)
end

#opensearchdescription_screen(request_full_uri, opt) ⇒ Object



65
66
67
# File 'lib/bitclust/screen.rb', line 65

def opensearchdescription_screen(request_full_uri, opt)
  new_screen(OpenSearchDescriptionScreen, request_full_uri, opt)
end

#search_screen(result, opt) ⇒ Object



69
70
71
# File 'lib/bitclust/screen.rb', line 69

def search_screen(result, opt)
  new_screen(SearchScreen, result, opt)
end