abs absolute value method : Object in Ruby « Class « Ruby






abs absolute value method


puts -1.abs

 

Related examples in the same category

1.Everything is an object or object-oriented in Ruby.
2.All strings in Ruby are objects of the String class, as you can discover by calling a string's class method
3.Get the modules Object class belongs to