class Sungemm::Queue
Public Class Methods
new(array)
click to toggle source
# File lib/sungemm/queue.rb, line 3 def initialize(array) @array = array end
Public Instance Methods
pop(count = 1)
click to toggle source
# File lib/sungemm/queue.rb, line 7 def pop(count = 1) r = @array.shift(count) r = r.first if count == 1 r end
push(values)
click to toggle source
# File lib/sungemm/queue.rb, line 13 def push(values) values.each { |x| @array << x } true end
to_a()
click to toggle source
# File lib/sungemm/queue.rb, line 18 def to_a @array end