Ruby perceptron