Skip to content

swathi-0901/QuikLearn

Repository files navigation

ruby-joy

Basic Introduction

Ruby is an ideal object-oriented programming language. The features of an object-oriented programming language include data encapsulation, polymorphism, inheritance, data abstraction, operator overloading etc.

What is an interepted language?

An interpreted language is a type of programming language for which most of its implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. The interpreter executes the program directly, translating each statement into a sequence of one or more subroutines, and then into another language (often machine code).

What is an object?

Everything in Ruby is an object.All objects have an identity;they can also hold state and manifest behaviour by responding to messages.These messages are normally dispatched through method calls.

What is a method?

A method in Ruby is a set of expressions that returns a value.With methods, one can organize their code into subroutines that can be easily invoked from other areas of their program. Other languages sometimes refer to this as a function. A method may be defined as a part of a class or separately.

What are classes?

A class is a blueprint from which objects are created. The object is also called as an instance of a class.

What are blocks?

A ruby block is a way of grouping statements, and may apper only in the source adjacent to a method call; the block is written starting on the same line as the method call's last parameter.

What is an array?

Ruby arrays are ordered, integer-indexed collections of any object. Each element in an array is associated with and referred to by an index.

What is an iterator?

Ruby iterator is a concept used in object-oriented language. Iteration means doing one thing many times like a loop. The loop method is the simplest iterator. They return all the elements from a collection, one after the other.

What are hashes?

Ruby hash is a collection of key-value pairs like this:"employee"=>"salary". It is similar to an array, except that indexinSg is done via arbitrary keys of any object type, not an integer index.

What is a library?

As most programming languages, Ruby leverages a wide set of third-party libraries. Nearly all these libraries are released in the form of a gem, a packaged library or application that can be installed with a tool called RubyGems.

What is a gem?

RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them.

About

This repo contains revision notes on ruby.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages