Ruby Programming

Описание

Ruby goes to great lengths to be a purely object oriented language. Every value in Ruby is an object, even the most primitive things: strings, numbers and even true and false. Every object has a class and every class has one superclass. At the root of the class hierarchy is the class Object, from which all other classes inherit. Every class has a set of methods which can be called on objects of that class. Methods are always called on an object — there are no “class methods”, as there are in many other languages (though Ruby does a great job of faking them). Every object has a set of instance variables which hold the state of the object. Instance variables are created and accessed from within methods called on the object. Instance variables are completely private to an object. No other object can see them, not even other objects of the same class, or the class itself. All communication between Ruby objects happens through methods.

Схожие книги

Ruby Data Structures and Algorithms. Christopher Fox
Ruby
en

Ruby Data Structures and Algorithms. Christopher Fox

Программирование на языке Ruby: Учебное пособие. Роганов Е.А. и Роганова Н.А
Ruby
ru

Программирование на языке Ruby: Учебное пособие. Роганов Е.А. и Роганова Н.А

Путь Rails. Подробное руководство по созданию приложений в среде Ruby on Rails. Оби Фернандес
Ruby
ru

Путь Rails. Подробное руководство по созданию приложений в среде Ruby on Rails. Оби Фернандес

Ruby. Объектно-ориентированное проектирование. Сэнди Метц
Ruby
ru

Ruby. Объектно-ориентированное проектирование. Сэнди Метц