Class: PDF::Writer::StateStack

Inherits:
Array
  • Object
show all
Defined in:
lib/gems/pdf-writer-1.1.8/lib/pdf/writer/state.rb

Instance Method Summary collapse

Instance Method Details

#__push__Object



33
# File 'lib/gems/pdf-writer-1.1.8/lib/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/gems/pdf-writer-1.1.8/lib/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