Last active
December 15, 2015 02:39
-
-
Save jonahoffline/5189153 to your computer and use it in GitHub Desktop.
WeleStack Queue example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'forwardable' | |
class WeleStack | |
extend Forwardable | |
def initialize(obj=[]) | |
@queue = obj | |
end | |
def_delegator :@queue, :push, :empuja | |
def_delegator :@queue, :shift, :quita | |
def_delegators :@queue, :clear, :empty?, :length, :size, :<< | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment