def create(hub, ref, obj):
    """
    Create an attribute at a given target using just a ref string and the
    object to be saved at said location. The desired location must already
    exist!

    :param ref: The dot delimited string referencing the target location to
        create the given object on the hub
    :param obj: The object to store at the given reference point
    """
    if '.' not in ref:
        setattr(hub, ref, obj)
        return
    comps = ref.split('.')
    sub_ref = ref[:ref.rindex('.')]
    var = comps[-1]
    top = hub.pop.ref.last(sub_ref)
    setattr(top, var, obj)
