{"push_id":878859779,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"4ee57c96a9c613403fc8379621c6705c637da133","before":"9d77c53b2de951259418ba4447805c9b3dd7529e","commits":[{"sha":"4ee57c96a9c613403fc8379621c6705c637da133","author":{"email":"521876e30f6b1764510aabae67edf1c7e7f70feb@gmail.com","name":"Asier"},"message":"Roman numerals in Ruby\n\nI used ruby's metaprograming to do this exercise. I added a \"to_roman\"\nmethod inside ruby's internal \"Fixnum\" class.\nThis is not the most maintable solution, it just just for the pourpouse\nof practicing one of the most powerfull tools of ruby - metaprograming.\nIn a real project I would avoid using it, it makes code hard to\nunderstand, much better to use a new type \"Decimal\" or create an\nexplicit convertor..\n\nI like how readable it is in ruby to loop a collection with the \"each\"\nnotation rather than using a \"while\" or \"for\" in another language.\n\nI came from doing the same exercise in python before this.\nI've got a bit confused with the notation to declare fields in a class. Python uses\n\"self.variable\" notation while ruby \"@.variable\" (for instance\nvariables) or \"@@.variable\" (for class variables). The self keyword is\nused in both languages to refer the current object, that's why the\nconfusion.\nI like more python when defining blocks with no need of the \"end\"\nkeyword - less verbose and concise code. Python uses \":\" to open a block and then is based in\nindentation.","distinct":true,"url":"https://api.github.com/repos/asierba/Practice/commits/4ee57c96a9c613403fc8379621c6705c637da133"}]}