add Buffer ruby class
This commit is contained in:
parent
7b56e874e3
commit
8c8cae552c
17
runtime/lib/buffer.rb
Normal file
17
runtime/lib/buffer.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class Buffer
|
||||
def initialize
|
||||
@contents = [
|
||||
"Welcome to jes.",
|
||||
"Press <Esc> to exit (for now!)",
|
||||
"0123456789",
|
||||
]
|
||||
end
|
||||
|
||||
def size
|
||||
@contents.size
|
||||
end
|
||||
|
||||
def [](index)
|
||||
@contents[index]
|
||||
end
|
||||
end
|
@ -3,6 +3,7 @@ def init_loadpath
|
||||
end
|
||||
|
||||
def load_lib_files
|
||||
require "buffer"
|
||||
require "buffer_widget"
|
||||
require "gl"
|
||||
require "gl_program"
|
||||
|
Loading…
x
Reference in New Issue
Block a user