class RPxem::Stack

Public Class Methods

new(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 3
def initialize(*args, &block)
  super(*args, &block)
  simple_check(*self)
end

Public Instance Methods

<<(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 18
def <<(*args, &block)
  simple_check(*args)
  super(*args, &block)
end
[]=(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 23
def []=(*args, &block)
  super(*args, &block)
  simple_check(*self)
end
insert(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 28
def insert(*args, &block)
  super(*args, &block)
  simple_check(*self)
end
map!(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 33
def map!(*args, &block)
  super(*args, &block)
  simple_check(*self)
end
push(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 8
def push(*args, &block)
  simple_check(*args)
  super(*args, &block)
end
unshift(*args, &block) click to toggle source
Calls superclass method
# File lib/rpxem/stack.rb, line 13
def unshift(*args, &block)
  simple_check(*args)
  super(*args, &block)
end

Private Instance Methods

simple_check(*args) click to toggle source
# File lib/rpxem/stack.rb, line 39
def simple_check(*args)
  args.each do |arg|
    if (!arg.is_a? Integer)
      raise ArgumentError.new 'Argument must be Integer'
    end
  end
end