Posts

Showing posts with the label ruby hash delete

Ruby Hash and its methods

 Hi, This is  Shubham Mishra  from India,  this is the part of  Ruby on Rails  exploration journey.  In this post we will discuss about the ruby's Hash and its methods available to simplify our development and make the code more smarter 😅 Ok then without wasting a time we start looking into Ruby's Hash. If you are new to the development then you can read below or if you are aware of what is hash then you can skip to next paragraph. Hash: Similar to array the Hash is a collection of objects but in the diffrent fashion. The hash store the items in the form of a key and its value. In short see below image, how lock can be access by the key assigned to it, similar to this only hash works. Enough theory let jump into it with some example, One important think to remember is Hash will always take unique key, It means one key cannot be considered again in the hash. Now i think you understood how hash works, now lets jump into some of the hash methods and how...