Ruby implementation of nodeattr.