def attribute_filter(attributes=nil, &filter)
      # make the attribute filter
      raise MetadataError.new("#{self} has not been introspected") unless introspected?
      ph = attributes ? attributes.to_compact_hash { |pa| @prop_hash[pa] } : @prop_hash
      AttributeEnumerator.new(ph, &filter)
    end
def attribute_filter(attributes=nil, &filter)
      # make the attribute filter
      raise MetadataError.new("#{self} has not been introspected") unless introspected?
      ph = attributes ? attributes.to_compact_hash { |pa| @prop_hash[pa] } : @prop_hash
      AttributeEnumerator.new(ph, &filter)
    end
Returns an {AttributeEnumerator} on this Resource class's attributes which iterates on each
 of the given attributes. If a filter block is given, then only those properties which
 satisfy the filter block are enumerated.

 @param [<Symbol>, nil] attributes the optional attributes to filter on (default all attributes)
 @yield [prop] the optional attribute selector
 @yieldparam [Property] prop the candidate attribute
 @return [AttributeEnumerator] a new attribute enumerator