Top Level Namespace
Defined Under Namespace
Modules: Amun
Classes: Rect, String
Instance Method Summary
collapse
Instance Method Details
#find_file ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/amun/features/files.rb', line 5
def find_file(*)
Amun::Windows::MiniBufferWindow.new('Open file: ', Dir.pwd) do |window|
file_path = window.buffer.to_s
file_buffer = Amun::Buffer.new(file_path, File.open(file_path, 'r+'))
Amun::Buffer.instances << file_buffer
Amun::Buffer.current = file_buffer
end.attach(Amun::Application.frame)
true
end
|
#kill_amun ⇒ Object
3
4
5
|
# File 'lib/amun/features/quit.rb', line 3
def kill_amun(*)
exit 0
end
|
#log(event) ⇒ Object
4
5
6
7
8
|
# File 'lib/amun/features/echo_event.rb', line 4
def log(event)
event = event.encode!('UTF-8', 'UTF-8', invalid: :replace)
Amun::Buffer.messages << "#{event}\n"
end
|