Explain about Dig, Float and Max?



Explain about Dig, Float and Max?..

Answer / Abhay Singh

In Ruby on Rails, Dig refers to a method used for navigating through nested hashes. It can be used recursively to access values in multi-level hashes. Float is a built-in class that represents floating point numbers. Max is a method used to find the maximum value of an array or range. For example: dig({a: {b: [1, 2, 3]}}) # returns 3, float(2.5) returns 2.5, and [1, 2, 3].max # returns 3.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

How would you create a controller for the subject?

1 Answers  


What are naming conventions?

1 Answers  


What is the difference between render and redirect?

1 Answers  


Are there any disadvantages of ruby on rails? If yes, mention them.

1 Answers  


what is session and cookies

4 Answers  


How you run your Rails Application without creating database ?

1 Answers  


who developed rails?

1 Answers  


what is the difference between Active support’s “HashWithIndifferent” and Ruby’s “Hash” ?

1 Answers  


What is the symbol garbage collector?

1 Answers  


What is the use of $ in ruby?

1 Answers  


How do rails implement ajax?

1 Answers  


Explain view in rails?

1 Answers  


Categories