Project

General

Profile

« Previous | Next » 

Revision aa15cd46

Added by Marc Dequènes about 15 years ago

  • ID aa15cd46f83a1192ddd1e64a529969c40a87ac93

[cleanup] minor stuff

View differences:

lib/ldap_shadows/elements/object.rb
object_rel = {}
object_rel.merge!(self.parameters[:relations]) if self.parameters.include?(:relations)
self.parameters[:presentation][:allowed_aspects].each do |aspect_name|
self.possible_aspects.each do |aspect_name|
aspect = self.shadow.get_aspect(aspect_name)
if aspect.nil?
raise PreProcessingError, _("Aspect '%s' is missing for object '%s'") % [aspect_name, self.handle]
......
end
def self.possible_aspects
self.parameters[:presentation][:allowed_aspects].collect{|key| key.to_s }.sort
self.parameters[:presentation][:allowed_aspects].sort
end
def aspects
present_aspects = {}
self.class.parameters[:presentation][:allowed_aspects].each do |aspect_name|
self.class.possible_aspects.each do |aspect_name|
aspect = self.class.shadow.get_aspect(aspect_name)
aspect_mapping = aspect.parameters[:mapping]
present_aspects[aspect.handle] = aspect if self.classes & aspect_mapping[:classes] == aspect_mapping[:classes]

Also available in: Unified diff