inossidabile/wash_out — pull request #167 by maximchick (2014-12-27 19:34:15+00:00)
Title: Support for complex self referencing types

Allow to use self referencing complex structures like trees when leaf has reference to next leaf or array of leaves

Example:

module Magento
module Types
class ArrayOfCatalogCategoryEntities < WashOut::Type
type_name "ArrayOfCatalogCategoryEntities"
map(
:item => [Magento::Types::CatalogCategoryEntity]
)
end
end
end

module Magento
module Types
class CatalogCategoryEntity < WashOut::Type
type_name "catalogCategoryEntity"
map(
:category_id => :integer,
:parent_id => :integer,
:name => :string,
:is_active => :integer,
:position => :integer,
:level => :integer,
:children => Magento::Types::ArrayOfCatalogCategoryEntities
)
end
end
end

Before this fix you'll got endless recursion problem in parse_def method (Stack level is too deep)