Ruby classes and objects


  Translation results:

Ruby is an open source server-side scripting language for object-oriented programming. It was designed and developed by Yukihiro Matsumoto in Japan in the mid-1990s. In the Ruby community, Matsumoto is also known as Matz. Ruby runs on multiple platforms such as Windows, MAC OS, and various versions of UNIX.

Ruby classes and objectssyntax

Ruby is a perfect object-oriented programming language. Features of object-oriented programming languages ​​include:

Data encapsulation

Data abstraction

Polymorphism

Inheritance

Ruby classes and objectsexample

Class Vehicle{   Number no_of_wheels
   Number horsepower
   Characters type_of_tank
   Number Capacity
 
   Function speeding
   {
   } 
   Function driving
   {
   }   
   Function halting
   {
   }
}

Popular Recommendations

Home

Videos

Q&A