mirror of
https://github.com/Oreolek/Togataltu.git
synced 2024-04-25 05:39:42 +03:00
16 lines
215 B
Ruby
16 lines
215 B
Ruby
#!/usr/bin/env ruby
|
|
#encoding: utf-8
|
|
class Stack
|
|
def initialize
|
|
@stack = []
|
|
end
|
|
def push(item)
|
|
return @stack.push item
|
|
end
|
|
def pop
|
|
return @stack.pop
|
|
end
|
|
def count
|
|
@stack.length
|
|
end
|
|
end |