Google

def [](name) attr = get_attribute(name) return attr.value unless attr.nil? return nil end