add Buffer ruby class
This commit is contained in:
1 parent
7b56e874e3
commit
8c8cae552c
2 files changed
+18
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user