Class: ContentfulConverter::Stack
- Inherits:
-
Object
- Object
- ContentfulConverter::Stack
- Defined in:
- lib/contentful_converter/stack.rb
Instance Method Summary collapse
- #add(value) ⇒ Object
- #any? ⇒ Boolean
-
#initialize ⇒ Stack
constructor
A new instance of Stack.
- #pop ⇒ Object
Constructor Details
#initialize ⇒ Stack
Returns a new instance of Stack.
5 6 7 |
# File 'lib/contentful_converter/stack.rb', line 5 def initialize @stack = [] end |
Instance Method Details
#add(value) ⇒ Object
9 10 11 |
# File 'lib/contentful_converter/stack.rb', line 9 def add(value) @stack << value end |
#any? ⇒ Boolean
17 18 19 |
# File 'lib/contentful_converter/stack.rb', line 17 def any? @stack.any? end |
#pop ⇒ Object
13 14 15 |
# File 'lib/contentful_converter/stack.rb', line 13 def pop @stack.pop end |