Class: VimMate::App
Instance Attribute Summary
#builder, #controller, #database, #window
Instance Method Summary
collapse
#default_database, #dispatch, #save_default_database, #setup, #start, #widget, widget
Constructor Details
#initialize(opts = {}) ⇒ App
Returns a new instance of App.
3
4
5
6
|
# File 'lib/vim_mate/app.rb', line 3
def initialize(opts={})
@excludes = opts.delete(:excludes)
super
end
|
Instance Method Details
#add_path(path) ⇒ Object
26
27
28
29
30
|
# File 'lib/vim_mate/app.rb', line 26
def add_path(path)
file_tree.initial_adding do
file_tree.add_path(path)
end
end
|
#file_tree ⇒ Object
7
8
9
|
# File 'lib/vim_mate/app.rb', line 7
def file_tree
files.file_tree
end
|
#files ⇒ Object
10
11
12
|
# File 'lib/vim_mate/app.rb', line 10
def files
controller[:file_filter]
end
|
#post_setup ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/vim_mate/app.rb', line 32
def post_setup
super
@excludes.each do |rule|
file_tree.exclude! rule
end unless @excludes.blank?
ARGV.each do |file|
path = File.expand_path(file)
add_path(path)
end
end
|
#run ⇒ Object
48
49
50
51
52
53
54
|
# File 'lib/vim_mate/app.rb', line 48
def run
GLib::Timeout.add(23) do
vim.start
false
end
super
end
|
#vim ⇒ Object
13
14
15
|
# File 'lib/vim_mate/app.rb', line 13
def vim
controller[:vim].vim
end
|