tools/linter/fetcher.rb
# Runs a block with a matching set of a DiscoveryProperty and Api::Type property
Runs a block with a matching set of a DiscoveryProperty and Api::Type property
Runs a block with a matching set of a DiscoveryProperty and Api :: Type property
def run_on_properties(discovery_properties, api_properties, prefix, &block)
      discovery_properties.each do |disc_prop|
        api_props = api_properties.select { |p| p.name == disc_prop.name }
        raise 'Multiple properties with name' if api_props.length > 1
        api_prop = api_props.first
        yield(disc_prop, api_prop, "#{prefix}#{disc_prop.name}")
        if disc_prop.nested_properties?
          run_on_properties(disc_prop.nested_properties, nested_properties_for_api(api_prop),
                            "#{prefix}#{disc_prop.name}.", &block)
        end
      end
    end
def run_on_properties ( discovery_properties , api_properties , prefix , & block ) discovery_properties . each do | disc_prop | api_props = api_properties . select { | p | p . name == disc_prop . name } raise 'Multiple properties with name' if api_props . length > 1 api_prop = api_props . first yield ( disc_prop , api_prop , "#{prefix}#{disc_prop.name}" ) if disc_prop . nested_properties? run_on_properties ( disc_prop . nested_properties , nested_properties_for_api ( api_prop ) , "#{prefix}#{disc_prop.name}." , & block ) end end end
Runs a block with a matching set of a DiscoveryProperty and Api::Type property
Runs a block with a matching set of a DiscoveryProperty and Api :: Type property
discovery_properties
<not_specific>
api_properties
<not_specific>
prefix
<not_specific>
block
<not_specific>