Class: ContentfulConverter::Stack

Inherits:
Object
  • Object
show all
Defined in:
lib/contentful_converter/stack.rb

Instance Method Summary collapse

Constructor Details

#initializeStack

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

Returns:

  • (Boolean)


17
18
19
# File 'lib/contentful_converter/stack.rb', line 17

def any?
  @stack.any?
end

#popObject



13
14
15
# File 'lib/contentful_converter/stack.rb', line 13

def pop
  @stack.pop
end