Skip to content

Sustainable Development in Ruby, Part 2: Method Injection

Sometimes you have a need for an object method which the class author did not foresee. For instance, in our previous installment, we used the following code to accumulate packets until an ending packet was found:

class BufferedConnection < FMTP::Connection def receive buffer = "" […]