add Buffer ruby class

This commit is contained in:
josh committed 2014-08-14 21:37:37 -04:00
1 parent 7b56e874e3
commit 8c8cae552c
2 files changed
+18

No files matched your search

+17
View 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