Method attempts to see if the value has a specified method.

    Usage:

        {% load custom_filters %}
        {% if foo|method:"has_access" %}

def method(value, arg):
    """Method attempts to see if the value has a specified method.

    Usage:

        {% load custom_filters %}
        {% if foo|method:"has_access" %}

    """
    if hasattr(value, str(arg)):
        return getattr(value, str(arg))
    return "[%s has no method %s]" % (value, arg)