Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #THIS WORKS
- ## inside the worker
- def return_the_list
- AsteriskAcdList.new
- end
- ## in the library
- class AsteriskAcdList < Array
- def parse(e)
- target = self.select {|acd| acd.queue == e.queue }.first
- unless target.nil?
- target.route(e)
- else
- self << AsteriskAcd.new(e)
- end
- end
- #THIS Doesnt
- ## inside the worker
- def return_the_list
- array = Array.new
- def array.parse(e)
- target = self.select {|acd| acd.queue == e.queue }.first
- unless target.nil?
- target.route(e)
- else
- self << AsteriskAcd.new(e)
- end
- end
- array
- end
Add Comment
Please, Sign In to add comment