Class: Busted::Stack
- Inherits:
-
Object
- Object
- Busted::Stack
- Defined in:
- lib/busted/stack.rb
Instance Method Summary collapse
- #finished ⇒ Object
- #finished=(element) ⇒ Object
-
#initialize ⇒ Stack
constructor
A new instance of Stack.
- #started ⇒ Object
- #started=(element) ⇒ Object
Constructor Details
#initialize ⇒ Stack
Returns a new instance of Stack.
3 4 5 6 |
# File 'lib/busted/stack.rb', line 3 def initialize @started = [] @finished = [] end |
Instance Method Details
#finished ⇒ Object
16 17 18 |
# File 'lib/busted/stack.rb', line 16 def finished @finished.pop end |
#finished=(element) ⇒ Object
20 21 22 |
# File 'lib/busted/stack.rb', line 20 def finished=(element) @finished.push element end |
#started ⇒ Object
8 9 10 |
# File 'lib/busted/stack.rb', line 8 def started @started.pop end |
#started=(element) ⇒ Object
12 13 14 |
# File 'lib/busted/stack.rb', line 12 def started=(element) @started.push element end |