views:

22

answers:

0

Hi,

I have the following class which works fine in my development environment:

module LeadCapturer
  class LeadPartArray < DelegateClass(Array)

    def <<(part, &block)
      super(part) unless ((@arr.select{|p| p.text == part.text}.size > 0) || (part.text.strip.size == 0))
    end

    def initialize(arr = [])
      @arr = arr
      super(@arr) 
    end
  end
end

But in production I get the following error:

lead_part_array.rb:2: superclass mismatch for class LeadPartArray (TypeError)

Does anyone have any idea why this would happen?

Cheers

Paul