ads_common/lib/ads_common/parameters_validator.rb
def implode_parent(data_type)
      result = []
      if data_type[:base]
        parent_type = @registry.get_type_signature(data_type[:base])
        result += implode_parent(parent_type)
      end
      data_type[:fields].each do |field|
        # If the parent type includes a field with the same name, overwrite it.
        result.reject! {|parent_field| parent_field[:name].eql?(field[:name])}
        # Storing field's namespace.
        field[:ns] = data_type[:ns] if data_type[:ns]
        result << field
      end
      return result
    end
def implode_parent(data_type)
      result = []
      if data_type[:base]
        parent_type = @registry.get_type_signature(data_type[:base])
        result += implode_parent(parent_type)
      end
      data_type[:fields].each do |field|
        # If the parent type includes a field with the same name, overwrite it.
        result.reject! {|parent_field| parent_field[:name].eql?(field[:name])}
        # Storing field's namespace.
        field[:ns] = data_type[:ns] if data_type[:ns]
        result << field
      end
      return result
    end
def implode_parent ( data_type ) result = [ ] if data_type [ :base ] parent_type = @registry . get_type_signature ( data_type [ :base ] ) result += implode_parent ( parent_type ) end data_type [ :fields ] . each do | field | # If the parent type includes a field with the same name, overwrite it. result . reject! { | parent_field | parent_field [ :name ] . eql? ( field [ :name ] ) } # Storing field's namespace. field [ :ns ] = data_type [ :ns ] if data_type [ :ns ] result << field end return result end
Returns all inherited fields of superclasses for given type.
Returns all inherited fields of superclasses for given type .