+91 90691 39140 | +1 253 214 3115 | info@hub4tech.com | hub4tech

Ruby Interview Questions and Answers

1
Overview of Ruby programming language.

Ruby is a dynamic, open source programming language. It focuses on productivity and simplicity. The syntax is elegant which is natural to read and easy to write and use. The language is flexible, since it allows the developers alter freely all its parts. At will, one can remove essential parts and redefined. For instance , the symbol + can be redefined by the word ‘plus’ to one of the its classes – Numeric.

Ruby supports multiple programming paradigms, such as, functional, imperative, object oriented, relative. Dynamic memory management and dynamic type systems are additional features of Ruby.

2
Explain about ruby code blocks?

Ruby code blocks form an important part of ruby and are very fun to use. With the help of this feature you can place your code between do-end and you can associate them with method invocations and you can get an impression that they are like parameters. They may appear near to a source of the code and adjacent to a method call. The code is not executed during the program execution but it is executed when the context of its appearance is met or when it enters a method.

3
What is Rails?

Ruby on Rails is a web application framework. It is written in Ruby. Compare to other frameworks for web application, the big deal is the way Ruby on Rails does. A web application finished in days instead of weeks, it is noticed by the community. Maintenance and/or extension of messy and hard web applications is flexible with ruby rails.

4
Explain about interpolation?

Interpolation is a very important process in Ruby. Interpolation is the process of inserting a string into a literal. There is only one way in which you can interpolate a string into a literal by placing a Hash (#) within {} open and close brackets. This refers to a new name to by referring to the copy of the original method.

5
Describe class libraries in Ruby.

Ruby class libraries comprise of variety of domains, such as thread programming, data types, various domains. It has additional libraries evolving day by day. The following are the domains which has relevant class libraries.

Text processing - File, String, Regexp for quick and clean text processing.

CGI Programming - There are supporting class library for CGI programming support like, data base interface, eRuby, mod_ruby for Apache, text processing classes.

Network programming – Various well-designed sockets are available in ruby for network programming.

GUI programming – Ruby/Tk and Ruby/Gtk are the classes for GUI programming

XML programming – UTF-8 text processing regular expression engine make XML programming very handy in ruby. .

Copyright ©2015 Hub4Tech.com, All Rights Reserved. Hub4Tech™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.
FOLLOW US