Class: PDF::Writer::StateStack

Inherits:
Array show all
Defined in:
lib/extensions/pdf-writer/pdf/writer/state.rb

Instance Method Summary collapse

Methods inherited from Array

#bsearch_first, #bsearch_last, #bsearch_lower_boundary, #bsearch_range, #bsearch_upper_boundary, #count, #dclone, #inspect, #join, #pretty_print, #pretty_print_cycle, #reject

Instance Method Details

#__push__Object



33
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 33

alias_method :__push__, :push

#push(obj) ⇒ Object

alias_method :__pop__, :pop

Raises:

  • (TypeError)


36
37
38
39
40
41
# File 'lib/extensions/pdf-writer/pdf/writer/state.rb', line 36

def push(obj)
  return self if obj.nil?
  raise TypeError unless obj.kind_of?(PDF::Writer::State)
  return self if obj.blank?
  __push__(obj)
end