21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/kikeru/command.rb', line 21
def run(arguments)
if /\A(-h|--help)\z/ =~ arguments[0]
write_help_message
exit(true)
elsif /\A(-v|--version)\z/ =~ arguments[0]
write_version_message
exit(true)
end
files = files_from_arguments(arguments)
file_container = Kikeru::Container.new(files)
if file_container.empty?
write_empty_message
exit(false)
end
window = Kikeru::Window.new
window.add_container(file_container)
window.show_all
window.load
Gtk.main
end
|