lib/wire/model/validation.rb
# ensures that objects of given +type_as_string+ (i.e. networks)
# are attached to zones
ensures that objects of given +type_as_string+
are attached to zones
ensures that objects of given + type_as_string + are attached to zones
def objects_attached_to_zones?(type_as_string)
      zones = @project.get_element('zones')
      @project.get_element(type_as_string).each do |name, data|
        zone = data[:zone]    
        if !zone
          mark("#{type_as_string} is not attached to a zone", type_as_string, name)
        else
          mark("#{type_as_string} has invalid zone", type_as_string, name) unless zones.key?(zone)
        end
      end
    end
def objects_attached_to_zones? ( type_as_string ) zones = @project . get_element ( 'zones' ) @project . get_element ( type_as_string ) . each do | name , data | zone = data [ :zone ] if ! zone mark ( "#{type_as_string} is not attached to a zone" , type_as_string , name ) else mark ( "#{type_as_string} has invalid zone" , type_as_string , name ) unless zones . key? ( zone ) end end end
ensures that objects of given +type_as_string+ (i.e.
ensures that objects of given + type_as_string + ( i . e .
# assume that this object contains ref to a zone
type_as_string
<not_specific>