lib/openwfe/contextual.rb
#
# Looks up something in the application context, if the given
# key is a class, then the first value in the context of that
# class is returned.
#
Looks up something in the application context, if the given
key is a class, then the first value in the context of that
class is returned.
Looks up something in the application context if the given key is a class then the first value in the context of that class is returned .
def lookup (key)
      if key.kind_of?(Class)
        @application_context.each do |k, value|
          return value if value.class == key
        end
        return nil
      end
      @application_context[key]
    end
def lookup ( key ) if key . kind_of? ( Class ) @application_context . each do | k , value | return value if value . class == key end return nil end @application_context [ key ] end
Looks up something in the application context, if the given
key is a class, then the first value in the context of that
class is returned.
Looks up something in the application context if the given key is a class then the first value in the context of that class is returned .
key
<not_specific>