Initial commit

Porting all the code from Qiita and extending the tests.
I think I originally wrote this function, but looking back on it now, I don't see why this couldn't be a standard property with getter and setter methods