Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to create ruby object?



How to create ruby object?..

Answer / Sumsher Bahadur Chand

"To create an object in Ruby, you first define a class using the class keyword, then use the new method followed by the class name and any necessary arguments within parentheses. For example: MyClass.new("example"). This creates a new instance of MyClass with the value "example".

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

Who is the developer of Ruby?

1 Answers  


Explain about variables?

1 Answers  


what is the difference extend and include?

1 Answers  


What are the loops in ruby?

1 Answers  


Explain retry statement in ruby.

1 Answers  


Difference between nil and false in ruby?

1 Answers  


What's the difference in scope for these two variables: @name and @@name?

1 Answers  


Explain the types of variables available in ruby class?

1 Answers  


What are advantages of using ruby?

1 Answers  


How does a symbol differ from a string?

1 Answers  


Is ruby supports single inheritance/ multiple inheritance or both?

1 Answers  


What are ruby blocks.

1 Answers  


Categories