sudo gem install ruby_extend
<img src=“https://codeclimate.com/badge.png” />
Extend Hash with to_sorted_array : Recursively sorted array from hash
hash = {'user' => {'adress' => {'town' => 'Paris', 'street' => "rue de Quimper"}, 'name' => 'toto', 'age' => 12}} hash.to_sorted_array # => [["user", [["adress", [["street", "rue de Quimper"], ["town", "Paris"]]], ["age", 12], ["name", "toto"]]]
Extend Array with #to_hash : Recursively convert array to hash
array = [["user", [["adress", [["street", "rue de Quimper"], ["town", "Paris"]]], ["age", 12], ["name", "toto"]]]] array.to_hash # =>{"user"=> {"name"=>"toto", "adress"=>{"street"=>"rue de Quimper", "town"=>"Paris"}, "age"=>12}}
Array#move(from,to) Array#included_in?(array) Array#duplicates Array#map_with_index Array#average Array#longest