New answers tagged

2

Indentation The standard indentation style in Ruby is two spaces, not four. Single-quoted strings If you don't use string interpolation, it is helpful if you use single quotes for your strings. That way, it is immediately obvious that no string interpolation is taking place. Frozen string literals Immutable data structures and purely functional code are ...


1

Be careful naming your functions You declare a lambda function named EncodeAES, but this function itself doesn't know anything about AES. It accepts an object with an encrypt() member function which it calls, but that object could be anything. The name should reflect what the function does. This one does two things: it base64-encodes, and it calls encrypt(). ...


Top 50 recent answers are included